andrewhavens commented on issue #1895: Optimized image URLs 404 when using 
default config
URL: 
https://github.com/apache/incubator-pagespeed-mod/issues/1895#issuecomment-498759354
 
 
   Hi @oschaaf, thanks for your help. I was reading through the logs and I also 
found it strange that it was redirecting from http to https since the original 
request protocol was already using https. I found in the logs this line prior 
to the redirect:
   ```
   Jun 03 16:13:35 myapp-pr-38 app/web.1: 2019/06/03 23:13:34 [debug] 132#0: 
*310 http header: "X-Forwarded-Proto: https" 
   ```
   I think what's happening is that Heroku is internally passing along this 
header in the request, but pagespeed was not including it in its internal 
requests. So I started searching the documentation and found that there is a 
configuration setting to enable this:
   ```
   pagespeed RespectXForwardedProto on;
   ```
   Once I added that, it started working.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to