Skip to content
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

Fix nginx_subpath example by adding proxy_redirect #3108

Merged
merged 1 commit into from
May 22, 2024

Conversation

Lucas-lyh
Copy link
Contributor

#2977 issue is solved in this PR.
This problem is because starlette operating path which has / in the end by redirect to a new url+path without /.
But when proxy by Nginx, this url in docker is not the real url outside the proxy.
Nginx provide proxy_redirect to modify this url when proxy the redirect response.

@rodja rodja added bug Something isn't working enhancement New feature or request and removed enhancement New feature or request labels May 22, 2024
@rodja rodja added this to the 1.4.26 milestone May 22, 2024
@rodja rodja merged commit a950502 into zauberzeug:main May 22, 2024
1 check passed
@rodja
Copy link
Member

rodja commented May 22, 2024

Wow, that's great @Lucas-lyh! I did not know about the proxy_redirect option. Thanks a lot.

@falkoschindler falkoschindler changed the title fix: fix nginx_subpath example by add proxy_redirect Fix nginx_subpath example by adding proxy_redirect May 24, 2024
@falkoschindler falkoschindler added documentation Improvements or additions to documentation and removed bug Something isn't working labels May 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Nginx subpath example doesn't redirect correctly when navigating to subpage with trailing slash
3 participants