mirror of
https://codeberg.org/grunfink/snac2.git
synced 2024-11-10 03:50:38 +03:00
Improved OPTIONS method.
This commit is contained in:
parent
763ddae42f
commit
66642bcbcc
3
httpd.c
3
httpd.c
@ -373,6 +373,9 @@ void httpd_connection(FILE *f)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
if (strcmp(method, "OPTIONS") == 0) {
|
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;
|
status = HTTP_STATUS_OK;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user