From 20f1920e062247abfcf08b3c6d936132cfe78d33 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?An=C5=BEe=20Bertoncelj?= Date: Fri, 22 Dec 2017 23:53:41 +0100 Subject: [PATCH] Add a header for CORS support --- AnkiConnect.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/AnkiConnect.py b/AnkiConnect.py index 436c771..ecee2fe 100644 --- a/AnkiConnect.py +++ b/AnkiConnect.py @@ -217,7 +217,8 @@ class AjaxServer: def resetHeaders(self): self.headers = [ ['HTTP/1.1 200 OK', None], - ['Content-Type', 'text/json'] + ['Content-Type', 'text/json'], + ['Access-Control-Allow-Origin', '*'] ] self.extraHeaders = {}