#!/usr/bin/env python3
import http.server
import socketserver
import os

PORT = 8080
os.chdir(os.path.dirname(os.path.abspath(__file__)))

class H(http.server.SimpleHTTPRequestHandler):
    def end_headers(self):
        self.send_header("Cache-Control", "no-store")
        super().end_headers()

# Bind 0.0.0.0 so an Android device / emulator on the same network can reach
# the POC page (use http://<host-ip>:8080/poc.html). Restrict to a trusted
# network when running.
with socketserver.TCPServer(("0.0.0.0", PORT), H) as httpd:
    print(f"Serving POC on http://0.0.0.0:{PORT}/poc.html")
    httpd.serve_forever()
