Skip to content

Commit

Permalink
Merge pull request #231 from EarthSchlange/simplify_wsgi
Browse files Browse the repository at this point in the history
Simplified WSGI Application Call.
  • Loading branch information
Michael Hiiva authored Oct 14, 2021
2 parents c20423a + 66ac4f8 commit e898aec
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions agagd/agagd/wsgi.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,8 @@
]


def bootstrap_env(environ, start_response):
for key in agagd_environ_keys:
if key in environ:
os.environ[key] = environ[key]
def application(env, start_response):
if all(key in env for key in agagd_environ_keys):
os.environ[key] = env[key]
_application = get_wsgi_application()
return _application(environ, start_response)


application = bootstrap_env
return _application(env, start_response)

0 comments on commit e898aec

Please sign in to comment.