Closed geoffreyd closed 13 years ago
I see the exact same with an other port than 80. My proxied application redirects to a local URI, which is not on port 80 but on 3000.
However the proxy forces the redirect to 80.
~ PROXY: GET 403 /auth/homelet -> http://localhost:80/oauth?client_id=homelet_dev&redirect_uri=http%3A%2F%2Flocalhost%3A9292%2Fauth%2Fhomelet%2Fcallback&type=web_server
date: Thu, 17 Feb 2011 14:06:42 GMT
server: Apache/2.2.13 (Unix) mod_ssl/2.2.13 OpenSSL/0.9.8k DAV/2
content-length: 207
content-type: text/html; charset=iso-8859-1
This does not seem appropriate. I think the proxy should redirect too if there's a 301 or 302. Proxying is only used in development and in production the server will really redirect. Therefor, we have different behavior depending of the environment.
I've forked and fixed my problem. I guess this should also fix yours. https://github.com/sproutcore/abbot/pull/32
@geoffreyd, did #32 fix it? If not, can you test #53?
This should be fixed in master now. Can anyone confirm?
Haven’t heard anyone with this still an issue. Please re-open if that is not the case.
That's because it got fixed in #32
Because the proxy forces the use of a port, we get an infinite redirect loop for sites that redirect away from a set port.
ie. search.twitter.com:80 -> search.twitter.com
If the site is using port 80, the proxy shouldn't force it's usage by default. More info: http://groups.google.com/group/sproutcore/browse_thread/thread/4bfb21d9875eab2b