commit 66642bc

default  ·  2024-05-31 16:34:50 +0000 UTC
parent 763ddae
Improved OPTIONS method.
1 files changed,  +3, -0
+3, -0
 1@@ -373,6 +373,9 @@ void httpd_connection(FILE *f)
 2     }
 3     else
 4     if (strcmp(method, "OPTIONS") == 0) {
 5+        const char *methods = "OPTIONS, GET, HEAD, POST, PUT, DELETE";
 6+        headers = xs_dict_append(headers, "allow", methods);
 7+        headers = xs_dict_append(headers, "access-control-allow-methods", methods);
 8         status = HTTP_STATUS_OK;
 9     }
10     else