From 2f6b1444aeb2ea9e5d909ed4e15b926da5fa2257 Mon Sep 17 00:00:00 2001 From: Jean Sorgemoel Date: Sun, 5 Aug 2018 13:25:16 +0200 Subject: [PATCH] update header on manager --- pymanager/manager.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pymanager/manager.py b/pymanager/manager.py index 093fbba..435ddfa 100755 --- a/pymanager/manager.py +++ b/pymanager/manager.py @@ -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()