MCPcopy Create free account
hub / github.com/internetarchive/openlibrary / _https_middleware

Function _https_middleware

openlibrary/asgi_app.py:35–41  ·  view source on GitHub ↗
(app)

Source from the content-addressed store, hash-verified

33
34
35def _https_middleware(app):
36 def wrapper(environ, start_response):
37 if environ.get("HTTP_X_SCHEME") == "https":
38 environ["wsgi.url_scheme"] = "https"
39 return app(environ, start_response)
40
41 return wrapper
42
43
44def _load_legacy_wsgi():

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected