Return HTTP 403 for invalid Origin headers (#1353)
This commit is contained in:
parent
ca34666663
commit
7e93a9fc19
1 changed files with 3 additions and 3 deletions
|
|
@ -122,6 +122,6 @@ class TransportSecurityMiddleware:
|
|||
# Validate Origin header
|
||||
origin = request.headers.get("origin")
|
||||
if not self._validate_origin(origin):
|
||||
return Response("Invalid Origin header", status_code=400)
|
||||
return Response("Invalid Origin header", status_code=403)
|
||||
|
||||
return None
|
||||
|
|
|
|||
Loading…
Reference in a new issue