Skip to content

Commit 47d1606

Browse files
committed
convert provided trusted proxy count into an integer
1 parent 3363d5a commit 47d1606

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ def create_app(config_filename=None):
2828
if env.get("TRUSTED_PROXY_COUNT"):
2929
# for example if the request goes through one proxy
3030
# before hitting your application server
31-
app.wsgi_app = ProxyFix(app.wsgi_app, x_for=env.get("TRUSTED_PROXY_COUNT"))
31+
app.wsgi_app = ProxyFix(app.wsgi_app, x_for=int(env.get("TRUSTED_PROXY_COUNT") or 0))
3232

3333
if config_filename:
3434
app.config.from_pyfile(config_filename)

0 commit comments

Comments
 (0)