#!/usr/bin/env python3
import http.server, socketserver, os
os.chdir(os.path.dirname(os.path.abspath(__file__)))
PORT = 8080
class H(http.server.SimpleHTTPRequestHandler):
    def end_headers(self):
        # Web Serial requires a secure context; localhost is treated as secure.
        self.send_header('Cache-Control', 'no-store')
        super().end_headers()
with socketserver.TCPServer(("127.0.0.1", PORT), H) as httpd:
    print(f"serving on http://127.0.0.1:{PORT}/poc.html")
    httpd.serve_forever()
