mirror of
https://codeberg.org/grunfink/snac2.git
synced 2024-11-14 17:45:04 +00:00
Improved OPTIONS method.
This commit is contained in:
parent
763ddae42f
commit
66642bcbcc
1 changed files with 3 additions and 0 deletions
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 a new issue