Skip to content

Add werkzeug ProxyFix X-Forwarded-Prefix support #41

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sjaek
Copy link

@sjaek sjaek commented Jan 20, 2021

The base url is not the same as the blueprint mount point because the blueprint url is relative to the application context root.
So either the jinja template needs to be altered to use relative urls, or the base_url should be determined per request.
This commit changes the base_url to url_for(".show"), this makes the UI work for both proxied and direct requests.

@sjaek sjaek force-pushed the proxyfix-forwarded-prefix branch from fad23c4 to 02a8dbd Compare January 21, 2021 08:45
The base url is not the same as the blueprint mount point because the blueprint url is relative to the application context root.
So either the jinja template needs to be altered to use relative urls, or the base_url should be determined per request.
This commit changes the base_url to url_for(".show"), this makes the UI work for both proxied and direct requests.
@sjaek sjaek force-pushed the proxyfix-forwarded-prefix branch from 02a8dbd to 3f6b313 Compare January 21, 2021 08:48
@michael-xiii
Copy link

Actual problem +1

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