Skip to content

Conversation

@lucadelauw
Copy link

When Azure Functions applications are deployed behind proxies or load balancers (such as Azure Application Gateway), the 'x-forwarded-port' header may contain multiple comma-separated port values (e.g., "443,8080,433"). The current implementation attempts to convert the entire string to an integer, which causes an error and subsequent function crash.

My fix extracts the first port value from this header and also strips whitespaces. Also included new tests for these

see: Azure/azure-functions-python-worker#1768

@lucadelauw
Copy link
Author

@microsoft-github-policy-service agree

@lucadelauw
Copy link
Author

lucadelauw commented Nov 6, 2025

Can this please be looked at since it's quite a blocking issue. This is a fairly straightforward fix
@hallvictoria Would be highly appreciated if we can slip this into the next release. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant