Fix headers.get('origin') == None check
This commit is contained in:
parent
4653c5d95d
commit
f762c3ac0d
@ -136,7 +136,7 @@ class Handler(BaseHTTPRequestHandler):
|
|||||||
# check the Origin header vs CORS
|
# check the Origin header vs CORS
|
||||||
def _is_allowed(self):
|
def _is_allowed(self):
|
||||||
origin = self.headers.get('origin')
|
origin = self.headers.get('origin')
|
||||||
if origin == "":
|
if not origin:
|
||||||
logging.warning("request with no Origin header from %s" % self.address_string())
|
logging.warning("request with no Origin header from %s" % self.address_string())
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user