mirror of
https://github.com/quay/quay.git
synced 2026-01-26 06:21:37 +03:00
cors: check for request_origin being set (PROJQUAY-5213) (#1811)
Some browsers might not set the Origin header in the request. Ignore the origin check in such cases
This commit is contained in:
@@ -39,7 +39,7 @@ def crossorigin(anonymous=True):
|
||||
# the Origin header from the request to set the
|
||||
# correct Allow-Origin
|
||||
request_origin = request.headers.get("Origin")
|
||||
if request_origin in cors_origin_list:
|
||||
if request_origin and request_origin in cors_origin_list:
|
||||
cors_origin = request_origin
|
||||
|
||||
headers = BASE_CROSS_DOMAIN_HEADERS
|
||||
|
||||
Reference in New Issue
Block a user