-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
302 Redirects should be sent as relative URLs #2081
Comments
Sounds reasonable to me! Would you like to attempt a PR to change the Response headers? |
If I could, I would :-) I don't speak Ruby, and it looks like the URL is being given to the webserver API as a relative URL, so I assume it's being converted to an absolute URL within that API. This behaviour seems odd to me, hopefully it can be overridden. |
Okay, so I don't think I'm seeing the same behavior in development. Here's the logs for hitting root with an empty git repository:
What's the setup you're using? Webserver etc.? |
Really simple:
In another shell:
You can see the Location header I'm receiving is not the one Gollum thinks it's sending. Incidentally as you're looking in this area, there are also a whole lot of other headers it would be useful to have control over - if I wanted to remove |
Describe the bug
Proxying Gollum behind an HTTPS server would be a lot easier if, whenever a 302 Redirect is sent, it was sent as a relative URL.
For example, on new setup if I visit "http://wiki.local:4567/" I get the following
The host+port are always specified and the scheme for the Location header is always "http". This is a problem if I have a web proxy in front of Gollum wrapping the connection in HTTPS, I have to rewrite the headers.
The
Location
header does not have to use an absolute path - if Gollum sentLocation: /Home
that's equally valid, and requires no special processing if I have a proxy in front of it.Tested with gollum 6.0.0
The text was updated successfully, but these errors were encountered: