• Terence Lee's avatar
    handle proxy redirects even if the scheme doesn't match · 7ff0ea22
    Terence Lee authored
    Normally, when receiving a Location header, nginx will rewrite it to
    reference a URL if it matches the proxy_pass. This breaks when the
    scheme changes, since proxy_pass can have a scheme. For instance, if you
    have a proxy: "https://www.foo.com", but the Location on a redirect from
    that site returns "http://www.foo.com" nginx won't rewrite the URL. This
    fixes it by specifying the redirect for both http and https.
    7ff0ea22
simple_spec.rb 16.6 KB