1
0
mirror of synced 2024-11-28 17:40:51 +01:00
ImHex/dist/web/serve.py
iTrooz d15bd4771d
feat: Support for building ImHex for the web (#1328)
Co-authored-by: WerWolv <werwolv98@gmail.com>
Co-authored-by: AnnsAnn <git@annsann.eu>
2023-10-04 12:00:32 +02:00

14 lines
470 B
Python

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()