.html files are not served from CloudFront
-
Hello,
I recently connected my website to CloudFront with origin-pull. I’m having trouble with W3 Total Cache authentication, but I confirmed that all static files are being served through CloudFront.
However, I found that the _index_slash_ssl.html files generated in /wp-content/cache/page_enhanced/ are not being served through CloudFront.
I’m including the nginx.conf file generated by the plugin in the server block, and the following location blocks are already applied:
location ~ /wp-content/cache/page_enhanced.*br$ { brotli off; types { text/xml xml_br; } default_type text/html; add_header Content-Encoding br; expires 3600s; etag on; if_modified_since exact; add_header Pragma "public"; add_header Cache-Control "public"; add_header Strict-Transport-Security "max-age=31536000; includeSubDomains; preload"; add_header X-XSS-Protection "1; mode=block"; add_header Link "<$scheme://$host$request_uri>; rel=\"canonical\""; } location ~ /wp-content/cache/page_enhanced.*gzip$ { gzip off; types { text/xml xml_gzip; } default_type text/html; add_header Content-Encoding gzip; expires 3600s; etag on; if_modified_since exact; add_header Pragma "public"; add_header Cache-Control "public"; add_header Strict-Transport-Security "max-age=31536000; includeSubDomains; preload"; add_header X-XSS-Protection "1; mode=block"; add_header Link "<$scheme://$host$request_uri>; rel=\"canonical\""; }In CloudFront Behaviors, I have configured /wp-content/* and included the following headers: Origin, Access-Control-Request-Method, and Access-Control-Request-Headers.
To check if this problem was related to the encoding issue of Korean URLs on my website, I tested with English permalinks, but it still didn’t work.
ubuntu@instance-3:~$ curl -I https://vietnamguide.co.kr/%eb%b2%a0%ed%8a%b8%eb%82%a8%ec%96%b4-%eb%b2%88%ec%97%ad%ea%b8%b0-%ed%95%9c%ea%b5%ad%ec%96%b4-%ec%b6%94%ec%b2%9c-%eb%b9%84%ea%b5%90/
HTTP/2 200
server: nginx
date: Mon, 16 Dec 2024 09:50:48 GMT
content-type: text/html; charset=UTF-8
link: <https://vietnamguide.co.kr/wp-json/>; rel="https://api.w.org/"
link: <https://vietnamguide.co.kr/wp-json/wp/v2/posts/10008>; rel="alternate"; title="JSON"; type="application/json"
server-timing: wp-total;dur=217.22
strict-transport-security: max-age=31536000; includeSubDomains; preload
x-xss-protection: 1; mode=block
link: <https://vietnamguide.co.kr/%eb%b2%a0%ed%8a%b8%eb%82%a8%ec%96%b4-%eb%b2%88%ec%97%ad%ea%b8%b0-%ed%95%9c%ea%b5%ad%ec%96%b4-%ec%b6%94%ec%b2%9c-%eb%b9%84%ea%b5%90/>; rel="canonical"Could you please help me solve this issue?
Thank you!
The page I need help with: [log in to see the link]
The topic ‘.html files are not served from CloudFront’ is closed to new replies.