-
Notifications
You must be signed in to change notification settings - Fork 4
Description
@cehbrecht and @fmigneault I wanted to get your thoughts before submitting a PR.
If you look at this commit, I explain roughly why I think twitcher shouldn't allow redirects: 6e8203a
Our use case
Our problem is that we want to protect the web interface of geoserver behind twitcher. When a user logs in, a POST request is sent to twitcher and forwarded to geoserver. Geoserver responds with a series of 302 redirects. Twitcher sends back the last of these responses, which is the main geoserver page. But the user's browser still thinks it's at the POST url, and relative urls are broken. When I got to actually log in, all css, images and others were not loaded. With these changes, I could login successfully, because the redirects were sent to my browser directly, just as if twitcher wasn't there.
Where it could break existing applications
If application generates self-referential urls in the response content, this change should not break them if the app was configured correctly previously.
I believe the only place where this can cause a problem is when there is a redirect, and the app generates location header. If twitcher follows redirects, it will work. But if twitcher doesn't follow redirects, the browser will receive the protected url in the Location header and try to follow it. It will obviously break.
So... making this change would at least need to bump the minor 0.x version.