Skip to content

Commit 7f97eef

Browse files
authored
Add CORS headers to the http responses (google#418)
1 parent 51a64ff commit 7f97eef

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/ios_webkit_debug_proxy.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -679,7 +679,9 @@ ws_status iwdp_send_http(ws_t ws, bool is_head, const char *status,
679679
if (asprintf(&data,
680680
"HTTP/1.1 %s\r\n"
681681
"Content-length: %zd\r\n"
682-
"Connection: close"
682+
"Connection: close\r\n"
683+
"Access-Control-Allow-Origin: *\r\n"
684+
"Access-Control-Allow-Methods: GET, HEAD"
683685
"%s%s\r\n\r\n%s",
684686
status, (content ? strlen(content) : 0),
685687
(ctype ? "\r\nContent-Type: " : ""), (ctype ? ctype : ""),

0 commit comments

Comments
 (0)