Skip to content

Conversation

@lukasbindreiter
Copy link
Contributor

Related Issue(s):

Description:

The proxy header middleware doesn't parse the value of the proto key in case there is no host key as well. Which is the case if stac-fastapi is running on GCP as cloud run service behind their load balancer. Additionally it even failed with UnboundLocalError since port_str was never defined in that execution path but still used later on.

That's a small oversight from the last PR (#782) - I noticed it now after upgrading to v4.0.
I also added a testcase for an exact forwarded header that I receive on gcp - so that hopefully this finally fixes the issue.

PR Checklist:

  • pre-commit hooks pass locally
  • Tests pass (run make test)
  • Documentation has been updated to reflect changes, if applicable, and docs build successfully (run make docs)
  • Changes are added to the CHANGELOG.

@vincentsarago vincentsarago self-requested a review January 23, 2025 15:53
@vincentsarago vincentsarago merged commit 86316a2 into stac-utils:main Jan 23, 2025
7 checks passed
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