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!

@hallvictoria
Copy link
Contributor

Hi @lucadelauw, thanks for this. Our next beta release (1.25.0b2) has a lot of changes currently, but we can look at taking this in the beta release after (1.25.0b3). ETA for b3 release will be ~end of this week to unblock this scenario

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.

2 participants