Skip to content

Commit 69fa94a

Browse files
committed
add headers
1 parent 8e092c4 commit 69fa94a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

examples/server/server.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4376,6 +4376,9 @@ int main(int argc, char ** argv) {
43764376
res.set_content("Error: gzip is not supported by this browser", "text/plain");
43774377
} else {
43784378
res.set_header("Content-Encoding", "gzip");
4379+
// COEP and COOP headers, required by pyodide (python interpreter)
4380+
res.set_header("Cross-Origin-Embedder-Policy", "require-corp");
4381+
res.set_header("Cross-Origin-Opener-Policy", "same-origin");
43794382
res.set_content(reinterpret_cast<const char*>(index_html_gz), index_html_gz_len, "text/html; charset=utf-8");
43804383
}
43814384
return false;

0 commit comments

Comments
 (0)