gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[taler-sync] branch master updated: disable CORS


From: gnunet
Subject: [taler-sync] branch master updated: disable CORS
Date: Sat, 23 Nov 2019 08:29:33 +0100

This is an automated email from the git hooks/post-receive script.

grothoff pushed a commit to branch master
in repository sync.

The following commit(s) were added to refs/heads/master by this push:
     new e462042  disable CORS
e462042 is described below

commit e462042a4d7ce91c0731871f014b78e6906b4171
Author: Christian Grothoff <address@hidden>
AuthorDate: Sat Nov 23 08:28:33 2019 +0100

    disable CORS
---
 src/sync/sync-httpd_backup.c      | 12 ++++++++++++
 src/sync/sync-httpd_backup_post.c | 16 ++++++++++++++++
 src/sync/sync-httpd_responses.c   |  4 ++++
 3 files changed, 32 insertions(+)

diff --git a/src/sync/sync-httpd_backup.c b/src/sync/sync-httpd_backup.c
index 208aa12..e55c7d9 100644
--- a/src/sync/sync-httpd_backup.c
+++ b/src/sync/sync-httpd_backup.c
@@ -71,6 +71,10 @@ sync_handler_backup_get (struct MHD_Connection *connection,
       resp = MHD_create_response_from_buffer (0,
                                               NULL,
                                               MHD_RESPMEM_PERSISTENT);
+      GNUNET_break (MHD_YES ==
+                    MHD_add_response_header (resp,
+                                             
MHD_HTTP_HEADER_ACCESS_CONTROL_ALLOW_ORIGIN,
+                                             "*"));
       ret = MHD_queue_response (connection,
                                 MHD_HTTP_NO_CONTENT,
                                 resp);
@@ -107,6 +111,10 @@ sync_handler_backup_get (struct MHD_Connection *connection,
           resp = MHD_create_response_from_buffer (0,
                                                   NULL,
                                                   MHD_RESPMEM_PERSISTENT);
+          GNUNET_break (MHD_YES ==
+                        MHD_add_response_header (resp,
+                                                 
MHD_HTTP_HEADER_ACCESS_CONTROL_ALLOW_ORIGIN,
+                                                 "*"));
           ret = MHD_queue_response (connection,
                                     MHD_HTTP_NOT_MODIFIED,
                                     resp);
@@ -193,6 +201,10 @@ SH_return_backup (struct MHD_Connection *connection,
   resp = MHD_create_response_from_buffer (backup_size,
                                           backup,
                                           MHD_RESPMEM_MUST_FREE);
+  GNUNET_break (MHD_YES ==
+                MHD_add_response_header (resp,
+                                         
MHD_HTTP_HEADER_ACCESS_CONTROL_ALLOW_ORIGIN,
+                                         "*"));
   {
     char *sig_s;
     char *prev_s;
diff --git a/src/sync/sync-httpd_backup_post.c 
b/src/sync/sync-httpd_backup_post.c
index deb6701..41d6350 100644
--- a/src/sync/sync-httpd_backup_post.c
+++ b/src/sync/sync-httpd_backup_post.c
@@ -218,6 +218,10 @@ make_payment_request (const char *order_id)
   resp = MHD_create_response_from_buffer (0,
                                           NULL,
                                           MHD_RESPMEM_PERSISTENT);
+  GNUNET_break (MHD_YES ==
+                MHD_add_response_header (resp,
+                                         
MHD_HTTP_HEADER_ACCESS_CONTROL_ALLOW_ORIGIN,
+                                         "*"));
   {
     char *hdr;
 
@@ -689,6 +693,10 @@ sync_handler_backup_post (struct MHD_Connection 
*connection,
         resp = MHD_create_response_from_buffer (0,
                                                 NULL,
                                                 MHD_RESPMEM_PERSISTENT);
+        GNUNET_break (MHD_YES ==
+                      MHD_add_response_header (resp,
+                                               
MHD_HTTP_HEADER_ACCESS_CONTROL_ALLOW_ORIGIN,
+                                               "*"));
         ret = MHD_queue_response (connection,
                                   MHD_HTTP_NOT_MODIFIED,
                                   resp);
@@ -791,6 +799,10 @@ sync_handler_backup_post (struct MHD_Connection 
*connection,
       resp = MHD_create_response_from_buffer (0,
                                               NULL,
                                               MHD_RESPMEM_PERSISTENT);
+      GNUNET_break (MHD_YES ==
+                    MHD_add_response_header (resp,
+                                             
MHD_HTTP_HEADER_ACCESS_CONTROL_ALLOW_ORIGIN,
+                                             "*"));
       ret = MHD_queue_response (connection,
                                 MHD_HTTP_NOT_MODIFIED,
                                 resp);
@@ -807,6 +819,10 @@ sync_handler_backup_post (struct MHD_Connection 
*connection,
     resp = MHD_create_response_from_buffer (0,
                                             NULL,
                                             MHD_RESPMEM_PERSISTENT);
+    GNUNET_break (MHD_YES ==
+                  MHD_add_response_header (resp,
+                                           
MHD_HTTP_HEADER_ACCESS_CONTROL_ALLOW_ORIGIN,
+                                           "*"));
     ret = MHD_queue_response (connection,
                               MHD_HTTP_NO_CONTENT,
                               resp);
diff --git a/src/sync/sync-httpd_responses.c b/src/sync/sync-httpd_responses.c
index 1cc787a..628a0ac 100644
--- a/src/sync/sync-httpd_responses.c
+++ b/src/sync/sync-httpd_responses.c
@@ -58,6 +58,10 @@ SH_RESPONSE_make_json (const json_t *json)
     GNUNET_break (0);
     return NULL;
   }
+  GNUNET_break (MHD_YES ==
+                MHD_add_response_header (resp,
+                                         
MHD_HTTP_HEADER_ACCESS_CONTROL_ALLOW_ORIGIN,
+                                         "*"));
   GNUNET_break (MHD_YES ==
                 MHD_add_response_header (resp,
                                          MHD_HTTP_HEADER_CONTENT_TYPE,

-- 
To stop receiving notification emails like this one, please contact
address@hidden.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]