Skip to content

Instantly share code, notes, and snippets.

@mcm
mcm / serve.py
Last active January 3, 2016 03:49 — forked from dustingetz/serve.py
serve static assets for frontend development, with http headers to disable caching
import argparse
from http.server import SimpleHTTPRequestHandler, test
class MyHTTPRequestHandler(SimpleHTTPRequestHandler):
def end_headers(self):
self.send_my_headers()
super().end_headers()
def send_my_headers(self):
template Host "appX.xxx" {
import "generic-host"
vars.os = "Linux"
vars.os_family = "Centos"
vars.placement = "yyy"
vars.placement = "komus"
vars.operator = "on_call"
vars.sla = "24x7"
vars.disable_ssh_check = "1"