From 4118a0860a9aaea149acc924c3fb50c24605c785 Mon Sep 17 00:00:00 2001 From: John Owens Date: Mon, 28 Oct 2024 15:28:08 -0700 Subject: [PATCH] remove this server --- meshes/simple_cors_server.py | 17 ----------------- 1 file changed, 17 deletions(-) delete mode 100755 meshes/simple_cors_server.py diff --git a/meshes/simple_cors_server.py b/meshes/simple_cors_server.py deleted file mode 100755 index f03878c..0000000 --- a/meshes/simple_cors_server.py +++ /dev/null @@ -1,17 +0,0 @@ -#!/usr/bin/env python3 -# encoding: utf-8 -"""Use instead of `python3 -m http.server` when you need CORS""" - -from http.server import HTTPServer, SimpleHTTPRequestHandler - - -class CORSRequestHandler(SimpleHTTPRequestHandler): - def end_headers(self): - self.send_header('Access-Control-Allow-Origin', '*') - self.send_header('Access-Control-Allow-Methods', 'GET') - self.send_header('Cache-Control', 'no-store, no-cache, must-revalidate') - return super(CORSRequestHandler, self).end_headers() - - -httpd = HTTPServer(('localhost', 8000), CORSRequestHandler) -httpd.serve_forever() \ No newline at end of file