Remove cookies from logging output
HTTP cookies are shared across all ports on a host. The log might contain session ids or CSRF tokens from other applications on the same host.
This commit is contained in:
parent
f87c16a42b
commit
a73a7ab193
@ -250,6 +250,8 @@ class Application:
|
||||
authorization = request_environ.get("HTTP_AUTHORIZATION", "")
|
||||
if mask_passwords and authorization.startswith("Basic"):
|
||||
request_environ["HTTP_AUTHORIZATION"] = "Basic **masked**"
|
||||
if request_environ.get("HTTP_COOKIE"):
|
||||
request_environ["HTTP_COOKIE"] = "**masked**"
|
||||
|
||||
return request_environ
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user