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

feat: add proxy redirect support #4

Merged
merged 1 commit into from
Aug 3, 2022

Conversation

lucasoares
Copy link
Contributor

@lucasoares lucasoares commented May 20, 2022

Closes #3

Since fiber doesn't handle proxy redirects in its redirect function, I think this may help people to configure Swagger behind a proxy.

Maybe in the future fiber itself should handle it, just like what the Spring (one of the most used web frameworks in the world) do in its implementation: ForwardedHeaderTransformer.java

In this PR the proxy prefix is handled only once to match the previous implementation so it will not fix all possible problems (for example accessing the documentation from a gateway and then accessing it from a port-forward at the same time). But I think it is acceptable for now since it will fix the most common one (accessing from the gateway).

@ReneWerner87 ReneWerner87 added the ✏️ Feature New feature or request label Aug 3, 2022
@ReneWerner87 ReneWerner87 merged commit efdf6ec into gofiber:main Aug 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✏️ Feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Reverse Proxy configuration
2 participants