Explorar o código

Add COOP/COEP headers to HTML5 "run" server.

This allow the page to be considered a SecureContext if the address is
localhost (127.0.0.1/::1) and let Firefox (and future Chrome versions)
enable extra features needed for the HTML5 threaded export.
Fabio Alessandrelli %!s(int64=5) %!d(string=hai) anos
pai
achega
0ca7bc374e
Modificáronse 1 ficheiros con 3 adicións e 0 borrados
  1. 3 0
      platform/javascript/export/export.cpp

+ 3 - 0
platform/javascript/export/export.cpp

@@ -124,6 +124,9 @@ public:
 		String s = "HTTP/1.1 200 OK\r\n";
 		s += "Connection: Close\r\n";
 		s += "Content-Type: " + ctype + "\r\n";
+		s += "Access-Control-Allow-Origin: *\r\n";
+		s += "Cross-Origin-Opener-Policy: same-origin\r\n";
+		s += "Cross-Origin-Embedder-Policy: require-corp\r\n";
 		s += "\r\n";
 		CharString cs = s.utf8();
 		Error err = connection->put_data((const uint8_t *)cs.get_data(), cs.size() - 1);