update header on manager

This commit is contained in:
Jean Sorgemoel 2018-08-05 13:25:16 +02:00
parent 69cd23bf84
commit 2f6b1444ae

View file

@ -179,6 +179,9 @@ class ManageHttpRequest(http.server.SimpleHTTPRequestHandler):
""" Prepare header """
self.send_response(200)
self.send_header('Content-type', 'application/json')
self.send_header('Access-Control-Allow-Origin', '*')
self.send_header('Access-Control-Allow-Methods', 'GET, POST, OPTIONS')
self.send_header("Access-Control-Allow-Headers", "Content-Type, *")
self.end_headers()
def _extract_input_data(self):
@ -452,7 +455,7 @@ class ManageHttpRequest(http.server.SimpleHTTPRequestHandler):
self.send_response(200, "ok")
self.send_header('Access-Control-Allow-Origin', '*')
self.send_header('Access-Control-Allow-Methods', 'GET, POST, OPTIONS')
self.send_header("Access-Control-Allow-Headers", "*")
self.send_header("Access-Control-Allow-Headers", "Content-Type, *")
self.end_headers()