<div dir="ltr">Hi Maxim,<div><br></div><div>I have considered something like `<span style="font-size:12.8000001907349px">relative_redirects`. It would also be a good directive to have, but it wouldn't allow </span><span style="font-size:12.8000001907349px">301 redirects from nginx to always use the same hostname, e.g. <a href="http://www.example.com">www.example.com</a></span></div><div><span style="font-size:12.8000001907349px"><br></span></div><div><span style="font-size:12.8000001907349px">e.g.</span><br></div><div>Currently, I need to set `server_name_in_redirect <a href="http://www.example.com">www.example.com</a>` and MUST have nginx terminate SSL.</div><div><span style="font-size:12.8000001907349px">`relative_redirects` wouldn't let me have nginx behind a SSL terminator AND use `</span>server_name_in_redirect`, because the relative 301s wouldn't force people to move to <a href="http://www.example.com">www.example.com</a><br></div><div><br></div><div>I have also considered the option of: `scheme_in_redirect http|https` and not letting it have a variable. This would simplify the implementation by a lot.</div><div><br></div><div>It wouldn't solve my exact problem, but it would solve the other two problems I linked in the beginning of my last email.</div><div><br></div><div>Thanks for getting back to me (and all your hard work)!</div><div>Kyle</div><div><br></div><div>P.S. Instead of `client_scheme_in_redirect` I should have just called it `scheme_in_redirect`</div><div><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Mar 18, 2015 at 9:22 AM, Maxim Dounin <span dir="ltr"><<a href="mailto:mdounin@mdounin.ru" target="_blank">mdounin@mdounin.ru</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello!<br>
<span class=""><br>
On Sun, Mar 15, 2015 at 04:07:11AM -0700, Kyle Ibrahim wrote:<br>
<br>
> Currently, there is no way way to control the scheme which will be used in<br>
> nginx-issued redirects. This is a problem when the client is potentially<br>
> using a different scheme than nginx due to a SSL terminating load balancer.<br>
> As some client requests may have started over http and some over https,<br>
> we'd like to way to dynamically set the proper client scheme.<br>
><br>
> This is a patch which adds a directive `client_scheme_in_redirect` to<br>
> complement `server_name_in_redirect` and `port_in_redirect`.<br>
<br>
</span>Have you considered doing something like "relative_redirects on|off"<br>
instead, as previously suggested[1]?<br>
<br>
I believe it will resolve the problem as well, and will address<br>
additional problems too.  It is also expected to require simplier<br>
and more effective code.<br>
<br>
[1] <a href="http://mailman.nginx.org/pipermail/nginx-devel/2015-March/006608.html" target="_blank">http://mailman.nginx.org/pipermail/nginx-devel/2015-March/006608.html</a><br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
Maxim Dounin<br>
<a href="http://nginx.org/" target="_blank">http://nginx.org/</a><br>
<br>
_______________________________________________<br>
nginx-devel mailing list<br>
<a href="mailto:nginx-devel@nginx.org">nginx-devel@nginx.org</a><br>
<a href="http://mailman.nginx.org/mailman/listinfo/nginx-devel" target="_blank">http://mailman.nginx.org/mailman/listinfo/nginx-devel</a><br>
</font></span></blockquote></div><br></div>