40c05b4a4f
Only set headers_out->location when the upstream originally did as well. If the Location: header value involved starts with "/" nginx will absolutify it, ignoring any X-Forwarded-Proto header in the process. Fixes https://github.com/pagespeed/ngx_pagespeed/issues/819 (Confirmed: https://github.com/pagespeed/ngx_pagespeed/issues/1029) Hopefully fixes https://github.com/pagespeed/ngx_pagespeed/issues/711