BRM
BRM
CDCloudflare Developers
Created by BRM on 7/9/2024 in #pages-help
HTTPS resources redirected to HTTP causing mixed content issues
I'm hosting a simple static Hugo site on Cloudflare Pages and encountering a problem where some resources, like the favicon, are redirected from HTTPS to HTTP. This causes my website to be flagged as not secure. I can confirm this with curl:
user@mydesktop:~$ curl -I 'https://brunorochamoura.com/favicon-16x16.png'
HTTP/2 302
date: Tue, 09 Jul 2024 17:25:25 GMT
content-type: text/html; charset=utf-8
location: http://www.brunorochamoura.com/favicon-16x16.png
x-served-by: Namecheap URL Forward
cf-cache-status: BYPASS
report-to: {"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v4?s=F5XHSsXXi%2F7Jz1FHHhSuo9NsnciYyj5r2R7H7UHxE9p%2B46W7qAwRRsBSq1KoPECmgAc%2F6rmwDCYmlFiyFKH1Qj%2F6onJnxuOYhNFFK%2B51gITKnkPqRnsO1FTyGNmmDHVspk0qo8Ey0wfQZ4v6wTXHAKlJ"}],"group":"cf-nel","max_age":604800}
nel: {"success_fraction":0,"report_to":"cf-nel","max_age":604800}
server: cloudflare
cf-ray: 8a0a035ebcbb3676-MAD
alt-svc: h3=":443"; ma=86400
user@mydesktop:~$ curl -I 'https://brunorochamoura.com/favicon-16x16.png'
HTTP/2 302
date: Tue, 09 Jul 2024 17:25:25 GMT
content-type: text/html; charset=utf-8
location: http://www.brunorochamoura.com/favicon-16x16.png
x-served-by: Namecheap URL Forward
cf-cache-status: BYPASS
report-to: {"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v4?s=F5XHSsXXi%2F7Jz1FHHhSuo9NsnciYyj5r2R7H7UHxE9p%2B46W7qAwRRsBSq1KoPECmgAc%2F6rmwDCYmlFiyFKH1Qj%2F6onJnxuOYhNFFK%2B51gITKnkPqRnsO1FTyGNmmDHVspk0qo8Ey0wfQZ4v6wTXHAKlJ"}],"group":"cf-nel","max_age":604800}
nel: {"success_fraction":0,"report_to":"cf-nel","max_age":604800}
server: cloudflare
cf-ray: 8a0a035ebcbb3676-MAD
alt-svc: h3=":443"; ma=86400
I already have Automatic HTTPS Rewrites enabled. My SSL/TLS setting is "Flexible". When I switch to "Full", my site stops working. A friend with a similar static Hugo website hosted in the same way doesn't have this issue, so I'm guessing it's not the issue. I would appreciate help troubleshooting this out.
23 replies