문제

Is there a way to stop Cloudfront caching sitemap files that are changing hourly?

The files live on an nginx server so maybe something can be done there around expiry.

Maybe:

location ~* \.(xml)$ {
  expires -1;
  log_not_found off;
}

The files are standard files like

www.site.com/sitemap.xml
www.site.com/sitemap1.xml.gz
www.site.com/sitemap2.xml.gz
www.site.com/sitemap3.xml.gz
www.site.com/sitemap4.xml.gz

Any advice would be greatly appreciated... thx

올바른 솔루션이 없습니다

다른 팁

Based on the CloudFront documentation, http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Expiration.html#ExpirationDownloadDist, you should be able to accomplish this with a Cache-Control or expires header. Do you have an example where this is not working?

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top