Fix headers.get('origin') == None check

This commit is contained in:
Kirill 2019-10-20 20:03:17 +03:00 committed by GitHub
parent 4653c5d95d
commit f762c3ac0d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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