1
0
mirror of synced 2024-11-15 03:27:40 +01:00
ImHex/dist/web/serve.py

14 lines
470 B
Python
Raw Normal View History

import http.server
import os
class MyHttpRequestHandler(http.server.SimpleHTTPRequestHandler):
def end_headers(self):
self.send_header("Cross-Origin-Embedder-Policy", "require-corp")
self.send_header("Cross-Origin-Opener-Policy", "same-origin")
http.server.SimpleHTTPRequestHandler.end_headers(self)
if __name__ == '__main__':
os.chdir(".")
httpd = http.server.HTTPServer(("", 9090), MyHttpRequestHandler)
httpd.serve_forever()