Hi Marius. On Mon, Aug 23, 2010 at 12:54 PM, Marius Mårnes Mathiesen < marius.mathie...@gmail.com> wrote:
> On Mon, Aug 23, 2010 at 11:13 AM, Benjamin Podszun < > benjamin.pods...@gmail.com> wrote: > >> This sounds like a workaround (and I'm willing to go down that route, if >> necessary. Without a working HTTPS deployment this won't fly internally and >> a lot of my time would've been spent on proposing a solution that doesn't >> work as intended by us). But before I do that I'd like to confirm that yes, >> gitorious (or some of the things it's built on) issues this redirect. >> Since you seem to know more about ruby/rails than I do: Could you give me >> a starting point where I should begin to look for the offending code? >> > > The offending line would be in app/helpers/application_helper.rb's > dashboard_path method: > > def dashboard_path > root_url(:host => GitoriousConfig["gitorious_host"], :protocol => > "http") > end > > Gitorious.org uses the secure.gitorious.org hostname with SSL for logins, > and redirects to the regular hostname (gitorious.org) after successful > authentication. Skipping the :protocol parameter in this method should keep > the protocol. > This sounded so good, so logical, almost too good to be true. Unfortunately it didn't solve the problem for me or I'm missing something. =( I changed that line and removed the :protocol completely (Stupid question: Is it defaulting to the current protocol or http then..?), so it looks like this now: def dashboard_path root_url(:host => GitoriousConfig["gitorious_host"]) end Navigating to my site I see this in the logs: ==> /var/log/apache2/gitorious_ssl_access.log <== 10.20.10.70 - - [23/Aug/2010:14:09:45 +0300] "GET / HTTP/1.1" 401 2912 "-" "Links (2.2; Linux 2.6.31-16-generic-pae i686; 157x46)" 10.20.10.70 - - [23/Aug/2010:14:09:45 +0300] "GET / HTTP/1.1" 401 341 That's fine, it's asking for credentials ==> /var/log/apache2/gitorious_ssl_access.log <== 10.20.10.70 - mydomain\\Benjamin.Podszun [23/Aug/2010:14:09:52 +0300] "GET / HTTP/1.1" 302 2896 "-" "Links (2.2; Linux 2.6.31-16-generic-pae i686; 157x46)" 10.20.10.70 - mydomain\\Benjamin.Podszun [23/Aug/2010:14:09:52 +0300] "GET / HTTP/1.1" 302 94 That's bad. I logged in sucessfully but get a redirect ==> /var/log/apache2/gitorious_access.log <== 10.20.10.70 - - [23/Aug/2010:14:09:53 +0300] "GET / HTTP/1.1" 200 3979 "-" "Links (2.2; Linux 2.6.31-16-generic-pae i686; 157x46)" 10.20.10.70 - - [23/Aug/2010:14:09:53 +0300] "GET / HTTP/1.1" 200 3390 ... and end up on the http host again, that only works internally. Any other idea perhaps? As I said before, I'd start digging myself but I'm missing lots of core concepts, so pointers for possible causes would be great.. Regards, Ben -- To post to this group, send email to gitorious@googlegroups.com To unsubscribe from this group, send email to gitorious+unsubscr...@googlegroups.com