mirror of
https://github.com/servalproject/serval-dna.git
synced 2025-01-18 10:46:23 +00:00
Adds file:// protocol to CORS allowed paths for the sake of Safari on iOS
This commit is contained in:
parent
6ab2cc5bb6
commit
a4e1942d30
1
httpd.c
1
httpd.c
@ -358,6 +358,7 @@ int authorize_restful(struct http_request *r)
|
||||
&& (*remainder==':' || *remainder=='\0'))
|
||||
|| (strcase_startswith(r->request_header.origin, "http://127.0.0.1", &remainder)
|
||||
&& (*remainder==':' || *remainder=='\0'))
|
||||
|| (strcase_startswith(r->request_header.origin, "file://", &remainder))
|
||||
){
|
||||
strncpy(r->response.header.allow_origin,r->request_header.origin, sizeof r->response.header.allow_origin);
|
||||
r->response.header.allow_methods="GET, POST, OPTIONS";
|
||||
|
Loading…
Reference in New Issue
Block a user