Skip to content

Commit 1f1b69e

Browse files
committed
fix: set cors for every response
1 parent 400e036 commit 1f1b69e

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

util/http/http_methods.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@ void http_write_response(
1818
fprintf(stream, "Content-Type: %s\r\n", content_type ? content_type : "text/plain");
1919
if (content_length > 0)
2020
fprintf(stream, "Content-Length: %d\r\n", content_length);
21-
if (!status || strstr(status, "200 OK") == status)
22-
fprintf(stream, "Access-Control-Allow-Origin: *\r\n");
21+
fprintf(stream, "Access-Control-Allow-Origin: *\r\n");
2322
fprintf(stream, "\r\n");
2423
if (body) {
2524
fwrite(body, 1, content_length, stream);

0 commit comments

Comments
 (0)