misc: small fix or general refactoring i did not bother commenting

This commit is contained in:
Simone Margaritelli 2019-10-21 12:27:16 +02:00
parent f576fb609b
commit e943cfad70
No known key found for this signature in database
GPG Key ID: 82E42E7F3B34C97E

@ -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