1
0
mirror of https://github.com/sehugg/8bitworkshop.git synced 2024-06-21 14:29:59 +00:00
8bitworkshop/scripts/serveit.py
2023-11-02 12:39:11 -05:00

17 lines
527 B
Python
Executable File

#!/usr/bin/env python3
import http.server
class MyHTTPRequestHandler(http.server.SimpleHTTPRequestHandler):
def end_headers(self):
self.send_my_headers()
http.server.SimpleHTTPRequestHandler.end_headers(self)
def send_my_headers(self):
self.send_header("Cache-Control", "no-cache, no-store, must-revalidate")
self.send_header("Pragma", "no-cache")
self.send_header("Expires", "0")
if __name__ == '__main__':
http.server.test(HandlerClass=MyHTTPRequestHandler, port=8000)