fix: preserve browser form origins for update panel authentication
This commit is contained in:
@@ -229,7 +229,10 @@ class RequestBounds:
|
||||
if message['type'] == 'http.response.start':
|
||||
message['headers'] += [
|
||||
(b'cache-control', b'no-store'), (b'x-content-type-options', b'nosniff'),
|
||||
(b'referrer-policy', b'no-referrer'), (b'x-frame-options', b'DENY'),
|
||||
# no-referrer makes native form POSTs send Origin: null.
|
||||
# Keep same-origin form authentication working without
|
||||
# disclosing referrers to other sites.
|
||||
(b'referrer-policy', b'same-origin'), (b'x-frame-options', b'DENY'),
|
||||
(b'content-security-policy', b"default-src 'none'; style-src 'unsafe-inline'; form-action 'self'; frame-ancestors 'none'; base-uri 'none'"),
|
||||
]
|
||||
await send(message)
|
||||
|
||||
Reference in New Issue
Block a user