mirror of
https://codeberg.org/grunfink/snac2.git
synced 2024-11-09 19:50:26 +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
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user