-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Reverse proxy with Traefik on sub-path leads to a HTTP 302 redirection loop #23047
Comments
You need to remove the subpath from Traefik side before passing the request to Gitea. For example: if a user accesses |
So I should do something like a |
I appended this at my labels : But seeing my logs, Gitea still receives |
Even tried this : I can see the middleware in Traefik dashboard but it still doesn't seem to work. |
Hmm ... I can only provide these hints but I am not using traefik .... so sorry I have no idea about why traefik stripprefix doesn't work. |
I'll try to get some help by the traefik community. Thanks for you help ! You sure led my on the right path. Hope you don't mind keeping this issue open for a while, in case anyone seeing this could help, I'll try to get back here as soon as I get a solution, and update Gitea doc btw. |
Of course :) It may get closed in the future, but can always be re-opened.
That would be very appreciated <3 traefik with sub-path is something we don't have documented yet and so any help would be lovely. |
Okay I finally got this right ! Due to my poor knowledge about Traefik, I though setting up the middleware with the same name as the service would automatically assign it. Solution :
I would be happy to provide a PR to update the documentation, which would close this ticket. |
Add "Traefik with a sub-path" documentation closes #23047 Co-authored-by: techknowlogick <[email protected]>
Description
The title of the issue should be clear, I uploaded a screenshot below.
Here's my Gitea compose :
I tried every combination of trailing slashes with ROOT_URL and PathPrefix, couldn't make it work.
If I remove ROOT_URL and access it from
https://<MY DOMAIN>:3000
it works fine.The logs should give you relevant informations.
If we get to find the solution, I would be happy to contribute to documentation about sub-path with traefik like other proxies.
Gitea Version
1.18.4 (Digest: fc835996f659)
Can you reproduce the bug on the Gitea demo site?
No
Log Gist
https://gist.github.com/sven-eliasen/7f9ee471b212417f82f66e9cb0527226
Screenshots
Git Version
No response
Operating System
RHEL
How are you running Gitea?
Running with docker, see description for compose.
Database
SQLite
The text was updated successfully, but these errors were encountered: