I have the following settings in config.toml:
[[deployment.matchers]]
# Cache static assets for 1 year.
pattern = "^.+\\.(js|css|svg|ttf|woff2)$"
cacheControl = "max-age=31536000, no-transform, public"
gzip = true
[[deployment.matchers]]
pattern = "^.+\\.(png|jpg|gif|webp)$"
cacheControl = "max-age=31536000, no-transform, public"
gzip = false
But my website is still triggering the ‘Serve static assets with an efficient cache policy’ error on Google page insights.
My website is hosted on an S3 bucket with a CloudFront distribution in front of it.
I’m not sure why the cache policy above is not finding it’s way to CloudFront - I’m using hugo deploy to push the site to AWS.
Any ideas?
Thanks,
Mario