sproutcore / abbot

SproutCore Build Tools [deprecated]
http://www.sproutcore.com
88 stars 44 forks source link

Fixing two proxy bugs #32

Closed dmathieu closed 13 years ago

dmathieu commented 13 years ago

Hello,

These two commits are fixing two proxy bugs, encountered when the backend server sends redirections to different uris or ports.

wycats commented 13 years ago

Why should we send a redirect back to the browser when the host or port changes?

dmathieu commented 13 years ago

In my case, I'm authenticating with OAuth. So I have three development applications :

When I want to authenticate on the sproutcore app, I redirect to the locally proxied uri on the sinatra app, which redirects to the API in order to follow the OAuth protocol. However in the current master, the API app remains proxied by Abbot. But the login form can't work as when validating it, it'll try to load the sinatra app, not the rails one.

In production, the proxy would disappear and the sinatra and sproutcore apps would be on the same host. So when I redirect to the rails app, it'd really redirect to it and not remain on the same host.

I hope that's clear enough :)

dmathieu commented 13 years ago

Is there something unclear about my explanations or the pull request which makes you hold it ?

rsaccon commented 13 years ago

I need this fix as well, otherwise I end up on port 80 instead of a custom port when I do a proxied redirect (for a authentication scenario)

dmathieu commented 13 years ago

I have rebased my fork in order to remove all the noise commits, it should make the pull request more readable.