<div><div>Paul wrote:<br></div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"> Looking through the Rails source[1] I see that there are
<br>two situations where Rails will generate https links<br><br>153 def ssl?<br>154 @env['HTTPS'] == 'on' || @env['HTTP_X_FORWARDED_PROTO'] == 'https'<br>155 end<br><br>I had thought that I could used the [E=VAR:VAL] flag on a Rewrite rule
<br>but then I remembered that we're proxying to an independant http<br>server (mongrel) so it wouldn't make it across. I've got it working<br>by adding RequestHeader directive to my Rewrite rules:<br></blockquote></div>
<br>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?
<br><br>Josh<br><a href="http://shnoo.gr">http://shnoo.gr</a><br>