Improved OPTIONS method.

This commit is contained in:
default 2024-05-31 18:34:50 +02:00
parent 763ddae42f
commit 66642bcbcc

View file

@ -373,6 +373,9 @@ void httpd_connection(FILE *f)
}
else
if (strcmp(method, "OPTIONS") == 0) {
const char *methods = "OPTIONS, GET, HEAD, POST, PUT, DELETE";
headers = xs_dict_append(headers, "allow", methods);
headers = xs_dict_append(headers, "access-control-allow-methods", methods);
status = HTTP_STATUS_OK;
}
else