From f762c3ac0d8e3f739ff084b94872d3ba4b693acc Mon Sep 17 00:00:00 2001 From: Kirill <iam@python273.pw> Date: Sun, 20 Oct 2019 20:03:17 +0300 Subject: [PATCH] Fix headers.get('origin') == None check --- pwnagotchi/ui/web.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pwnagotchi/ui/web.py b/pwnagotchi/ui/web.py index ad727f7..7a08b8c 100644 --- a/pwnagotchi/ui/web.py +++ b/pwnagotchi/ui/web.py @@ -136,7 +136,7 @@ class Handler(BaseHTTPRequestHandler): # check the Origin header vs CORS def _is_allowed(self): origin = self.headers.get('origin') - if origin == "": + if not origin: logging.warning("request with no Origin header from %s" % self.address_string()) return False