OmnichordGodot/test/webserver.py

13 lines
403 B
Python
Raw Normal View History

2024-06-27 02:08:18 -03:00
from http import server
class MyHandler(server.SimpleHTTPRequestHandler):
def my_headers(self):
self.send_header('Cross-Origin-Opener-Policy', 'same-origin')
self.send_header('Cross-Origin-Embedder-Policy', 'require-corp')
def end_headers(self) -> None:
self.my_headers()
super().end_headers()
if __name__ == "__main__":
server.test(HandlerClass=MyHandler)