aboutsummaryrefslogtreecommitdiff
path: root/src/identity/plugin_rest_identity.c
diff options
context:
space:
mode:
authorMartin Schanzenbach <mschanzenbach@posteo.de>2015-06-29 14:33:38 +0000
committerMartin Schanzenbach <mschanzenbach@posteo.de>2015-06-29 14:33:38 +0000
commit13aba2e2ba02476410ccee95974c7c5181f83fcf (patch)
treedd0285f8b00635452759ceebdd104c648b2e2f2a /src/identity/plugin_rest_identity.c
parentd953fdc6293a9468019eebbcfed92c3b5387ec48 (diff)
downloadgnunet-13aba2e2ba02476410ccee95974c7c5181f83fcf.tar.gz
gnunet-13aba2e2ba02476410ccee95974c7c5181f83fcf.zip
- add CORS logic
Diffstat (limited to 'src/identity/plugin_rest_identity.c')
-rw-r--r--src/identity/plugin_rest_identity.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/identity/plugin_rest_identity.c b/src/identity/plugin_rest_identity.c
index 53c74dcf2..8a2c24d1f 100644
--- a/src/identity/plugin_rest_identity.c
+++ b/src/identity/plugin_rest_identity.c
@@ -799,6 +799,14 @@ libgnunet_plugin_rest_identity_init (void *cls)
799 api->cls = &plugin; 799 api->cls = &plugin;
800 api->name = GNUNET_REST_API_NS_IDENTITY; 800 api->name = GNUNET_REST_API_NS_IDENTITY;
801 api->process_request = &rest_identity_process_request; 801 api->process_request = &rest_identity_process_request;
802 GNUNET_asprintf (&api->allow_methods,
803 "%s, %s, %s, %s, %s",
804 MHD_HTTP_METHOD_GET,
805 MHD_HTTP_METHOD_POST,
806 MHD_HTTP_METHOD_PUT,
807 MHD_HTTP_METHOD_DELETE,
808 MHD_HTTP_METHOD_OPTIONS);
809
802 GNUNET_log (GNUNET_ERROR_TYPE_INFO, 810 GNUNET_log (GNUNET_ERROR_TYPE_INFO,
803 _("Identity REST API initialized\n")); 811 _("Identity REST API initialized\n"));
804 return api; 812 return api;
@@ -818,6 +826,7 @@ libgnunet_plugin_rest_identity_done (void *cls)
818 struct Plugin *plugin = api->cls; 826 struct Plugin *plugin = api->cls;
819 827
820 plugin->cfg = NULL; 828 plugin->cfg = NULL;
829 GNUNET_free_non_null (api->allow_methods);
821 GNUNET_free (api); 830 GNUNET_free (api);
822 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 831 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
823 "Identity REST plugin is finished\n"); 832 "Identity REST plugin is finished\n");