Remove environment variables from logs only if they are in the requests

This commit is contained in:
Guillaume Ayoub 2011-07-29 10:38:33 +02:00
parent cdae6f04e9
commit 58cdbf7450

View File

@ -113,6 +113,7 @@ class Application(object):
"""Remove environment variables from the headers for logging."""
request_environ = dict(environ)
for shell_variable in os.environ:
if shell_variable in request_environ:
del request_environ[shell_variable]
return request_environ
# pylint: enable=E0202