From 6ab14a20690a499ad32e3f2ad448d64d4e6b65fc Mon Sep 17 00:00:00 2001 From: Martin Schanzenbach Date: Thu, 6 Aug 2020 14:40:17 +0200 Subject: -fix various bugs --- src/reclaim/plugin_rest_reclaim.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/reclaim/plugin_rest_reclaim.c') diff --git a/src/reclaim/plugin_rest_reclaim.c b/src/reclaim/plugin_rest_reclaim.c index eb442bc3b..c2d14825e 100644 --- a/src/reclaim/plugin_rest_reclaim.c +++ b/src/reclaim/plugin_rest_reclaim.c @@ -331,6 +331,7 @@ finished_cont (void *cls, int32_t success, const char *emsg) resp = GNUNET_REST_create_response (emsg); MHD_add_response_header (resp, "Content-Type", "application/json"); + MHD_add_response_header (resp, "Access-Control-Allow-Methods", allow_methods); if (GNUNET_OK != success) { GNUNET_SCHEDULER_add_now (&do_error, handle); @@ -348,6 +349,7 @@ delete_finished_cb (void *cls, int32_t success, const char *emsg) struct MHD_Response *resp; resp = GNUNET_REST_create_response (emsg); + MHD_add_response_header (resp, "Access-Control-Allow-Methods", allow_methods); if (GNUNET_OK != success) { GNUNET_SCHEDULER_add_now (&do_error, handle); @@ -373,6 +375,7 @@ return_response (void *cls) result_str = json_dumps (handle->resp_object, 0); GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Result %s\n", result_str); resp = GNUNET_REST_create_response (result_str); + MHD_add_response_header (resp, "Access-Control-Allow-Methods", allow_methods); handle->proc (handle->proc_cls, resp, MHD_HTTP_OK); GNUNET_free (result_str); cleanup_handle (handle); -- cgit v1.2.3