From c07443fcc841ac19565e7a498ceec491f3d1c096 Mon Sep 17 00:00:00 2001 From: blob8108 Date: Thu, 9 Jan 2014 23:30:13 +0000 Subject: Don't recognise Snap! as a browser, take two --- blockext/__init__.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/blockext/__init__.py b/blockext/__init__.py index 62d0618..40427d7 100644 --- a/blockext/__init__.py +++ b/blockext/__init__.py @@ -75,12 +75,13 @@ class Blockext(BaseHTTPRequestHandler): self.send_response(200) self.send_header("Access-Control-Allow-Origin", "*") self.send_header("Access-Control-Allow-Headers", - "X-Requested-With, X-Application, Accept") + "X-Requested-With, X-Application") self.end_headers() def do_GET(self): is_browser = ("text/html" in self.headers.get("Accept", "") and - "Snap!" not in self.headers.get("X-Application", "")) + "Snap!" not in self.headers.get("X-Application", "") and + "Origin" not in self.headers) mime_type = "text/plain" path = self.path.split("/")[1:] -- cgit v1.3.1