aboutsummaryrefslogtreecommitdiffstats
path: root/app/comp-fe/cors_http_server.py
diff options
context:
space:
mode:
Diffstat (limited to 'app/comp-fe/cors_http_server.py')
-rw-r--r--app/comp-fe/cors_http_server.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/app/comp-fe/cors_http_server.py b/app/comp-fe/cors_http_server.py
new file mode 100644
index 0000000..8a54500
--- /dev/null
+++ b/app/comp-fe/cors_http_server.py
@@ -0,0 +1,13 @@
+#! /usr/bin/env python
+
+from SimpleHTTPServer import SimpleHTTPRequestHandler, test
+
+
+class CORSHTTPRequestHandler(SimpleHTTPRequestHandler):
+
+ def end_headers(self):
+ self.send_header('Access-Control-Allow-Origin', '*')
+ super(CORSHTTPRequestHandler, self).end_headers(self)
+
+if __name__ == '__main__':
+ test(HandlerClass=CORSHTTPRequestHandler) \ No newline at end of file