Paul wrote:

  Looking through the Rails source[1] I see that there are
two situations where Rails will generate https links

153         def ssl?
154           @env['HTTPS'] == 'on' || @env['HTTP_X_FORWARDED_PROTO'] == 'https'
155         end

I had thought that I could used the [E=VAR:VAL] flag on a Rewrite rule
but then I remembered that we're proxying to an independant http
server (mongrel) so it wouldn't make it across.  I've got it working
by adding RequestHeader directive to my Rewrite rules:

Does anybody know under what conditions Apache sets these environment variables? Should Mongrel set one of these variables if the protocol is https, or is it too late to make that call by the time it gets to Mongrel, since Mongrel can't guarantee that the request was sent over SSL?

Josh
http://shnoo.gr
_______________________________________________
Mongrel-users mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/mongrel-users

Reply via email to