Skip to content

Conversation

@constantinius
Copy link
Contributor

Related Issue(s):

Description:

A new env var REQUEST_BASE_URL is introduced to fix the base URL to the supplied value. When this variable is not set, the usual way of determining the base URL is used.

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.

@gadomski gadomski self-requested a review June 21, 2023 22:30
@gadomski gadomski linked an issue Jun 21, 2023 that may be closed by this pull request
return base_url

app = request.app
if not app.state.router_prefix:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was there a reason to not use the same mechanism as router_prefix, i.e. add a new base_url: Optional[str] attribute to the app state?

@vincentsarago
Copy link
Member

As for #636, I'm not convince we need this.

If the baseurl is not properly returned by starlette it usually mean there is a configuration issue in the proxy 🤔

@jonhealy1
Copy link
Collaborator

Should we close this for now?

@vincentsarago
Copy link
Member

@jonhealy1 IMO yes

@jonhealy1
Copy link
Collaborator

closing ..... feel free to reopen

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allowing to fix the request base URL

4 participants