From e943cfad707ed38fca89cf7ee299f6a414010ff2 Mon Sep 17 00:00:00 2001
From: Simone Margaritelli <evilsocket@gmail.com>
Date: Mon, 21 Oct 2019 12:27:16 +0200
Subject: [PATCH] misc: small fix or general refactoring i did not bother
 commenting

---
 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 021c37a..82af269 100644
--- a/pwnagotchi/ui/web.py
+++ b/pwnagotchi/ui/web.py
@@ -138,7 +138,7 @@ class Handler(BaseHTTPRequestHandler):
     # check the Origin header vs CORS
     def _is_allowed(self):
         origin = self.headers.get('origin')
-        if not origin:
+        if not origin and Handler.AllowedOrigin != '*':
             logging.warning("request with no Origin header from %s" % self.address_string())
             return False