<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Thu, Jul 25, 2013 at 5:11 AM, Jonathan Matthews <span dir="ltr"><<a href="mailto:contact@jpluscplusm.com" target="_blank">contact@jpluscplusm.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div><p dir="ltr"> </p></div></blockquote><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">
<div>
</div><p dir="ltr">What does this mean? Do you see SSL traffic, or do you mean heroku terminates the ssl leaving you with http connections only? </p></blockquote><div>Heroku handles SSL, and nginx sees only HTTP traffic.</div>
<div></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div>
<p dir="ltr">> 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.</p>
</div><p dir="ltr">Show us some config that generates these redirects. </p><div>
<p dir="ltr">> The usual fix for this is X-Forwarded-Proto, but nginx doesn't support that yet</p>
</div><p dir="ltr">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. </p></blockquote><div></div><div>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.</div>
<div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div>
</div><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></p></blockquote><div>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>
</div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">
<p dir="ltr">Do all requests have x-f-p? 100%? Then just change your redirects to reference it. </p></blockquote><div>I don't have any redirects. Nginx is doing this on its own.<br>
</div><div><br></div></div>-- <br>Glenn Maynard<br><br>
</div></div>