summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar default2024-05-31 18:34:50 +0200
committerGravatar default2024-05-31 18:34:50 +0200
commit66642bcbccdce3249e553e5b70627b508c76b127 (patch)
treef10ada281daee4ce10c732690db8b33ed1fc73e9
parentUpdated RELEASE_NOTES. (diff)
downloadsnac2-66642bcbccdce3249e553e5b70627b508c76b127.tar.gz
snac2-66642bcbccdce3249e553e5b70627b508c76b127.tar.xz
snac2-66642bcbccdce3249e553e5b70627b508c76b127.zip
Improved OPTIONS method.
-rw-r--r--httpd.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/httpd.c b/httpd.c
index d566b1e..81e520f 100644
--- a/httpd.c
+++ b/httpd.c
@@ -373,6 +373,9 @@ void httpd_connection(FILE *f)
373 } 373 }
374 else 374 else
375 if (strcmp(method, "OPTIONS") == 0) { 375 if (strcmp(method, "OPTIONS") == 0) {
376 const char *methods = "OPTIONS, GET, HEAD, POST, PUT, DELETE";
377 headers = xs_dict_append(headers, "allow", methods);
378 headers = xs_dict_append(headers, "access-control-allow-methods", methods);
376 status = HTTP_STATUS_OK; 379 status = HTTP_STATUS_OK;
377 } 380 }
378 else 381 else