diff options
| author | blob8108 <blob8108@gmail.com> | 2014-01-09 23:30:13 +0000 |
|---|---|---|
| committer | blob8108 <blob8108@gmail.com> | 2014-01-09 23:30:13 +0000 |
| commit | c07443fcc841ac19565e7a498ceec491f3d1c096 (patch) | |
| tree | 29e33b423a5c601507aeaa1dac3f3cdca1d5db5b | |
| parent | 9246d94777087ba072262771bf58c54469ee633c (diff) | |
| download | blockext-c07443fcc841ac19565e7a498ceec491f3d1c096.tar.gz blockext-c07443fcc841ac19565e7a498ceec491f3d1c096.zip | |
Don't recognise Snap! as a browser, take two
| -rw-r--r-- | blockext/__init__.py | 5 |
1 files 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:] |
