<p dir="ltr">On 25 Jul 2013 15:43, "Glenn Maynard" <<a href="mailto:glenn@zewt.org">glenn@zewt.org</a>> wrote:<br>
><br>
> On Thu, Jul 25, 2013 at 5:11 AM, Jonathan Matthews <<a href="mailto:contact@jpluscplusm.com">contact@jpluscplusm.com</a>> wrote:<br>
>><br>
>> What does this mean? Do you see SSL traffic, or do you mean heroku terminates the ssl leaving you with http connections only?<br>
><br>
> Heroku handles SSL, and nginx sees only HTTP traffic.<br>
>><br>
>> > This mostly works fine, but nginx has one problem with it: since it thinks the protocol is http, any redirects (such as trailing-slash redirects) go to http instead of https.<br>
>><br>
>> Show us some config that generates these redirects.<br>
>><br>
>> > The usual fix for this is X-Forwarded-Proto, but nginx doesn't support that yet<br>
>><br>
>> That doesn't make sense to me. What is there to support? You can just write your redirect directives using X-F-P instead of hard coding the scheme.<br>
><br>
> I'm not hardcoding anything.  Nginx is generating its own redirects.  The case I'm seeing currently is ngx_http_static_module redirecting to add a trailing slashes to URLs</p>
<p dir="ltr">On my phone's browser, searching for that module name doesn't bring me anything useful I'm afraid. Are you just serving local files off disk? </p>
<p dir="ltr">I bet you have redirects configured somewhere, or a backend is generating them ;-)</p>
<p dir="ltr">Please post your entire config. </p>
<p dir="ltr">>> You've gone into the code far too early IMHO. There's usually a way to change nginx's behaviour in config. <br>
><br>
> I've gone into the code precisely to find out how to do that, since the documentation wasn't helping.  I was surprised to discover that the protocol seems to be hardcoded.<br>
>><br>
>> Do all requests have x-f-p? 100%? Then just change your redirects to reference it.<br>
><br>
> I don't have any redirects.  Nginx is doing this on its own.</p>
<p dir="ltr">In response to what class of request? What's common across them?  </p>
<p dir="ltr">J</p>