fix: Crossing does not take effect (#3561)

This commit is contained in:
shaohuzhang1 2025-07-11 17:37:54 +08:00 committed by GitHub
parent 31f87119b6
commit 570bcfbaf2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -25,7 +25,7 @@ class CrossDomainMiddleware(MiddlewareMixin):
def process_response(self, request, response):
auth = request.META.get('HTTP_AUTHORIZATION')
origin = request.META.get('HTTP_ORIGIN')
if auth is not None and str(auth).startswith("application-") and origin is not None:
if auth is not None and str(auth).startswith("Bearer application-") and origin is not None:
application_api_key = get_application_api_key(str(auth), True)
cross_domain_list = application_api_key.get('cross_domain_list', [])
allow_cross_domain = application_api_key.get('allow_cross_domain', False)