I have a strict CSP policy on my site which is incompatible with asset optimization, so a while back I turned this off by adding to my netlify.toml
:
[build.processing]
skip_processing = true
Today, I noticed that one of my site previews is broken. Specifically, the site logo is not displaying in the header bar: https://main-preview--dwac-blog.netlify.app/
Looking at view-source:
, I see that the image was updated to redirect to CloudFront via what I believe to be asset optimization:
<img src="https://d33wubrfki0l68.cloudfront.net/b504111e3dd20ce4b1a0429dbef0d7f332ae1908/db7f6/res/img/logo.svg" alt="Site logo">
Sure enough, a link to *.cloudfront.net
breaks my CSP policy and the network request fails. I believe my existing netlify.toml
configuration should disable asset optimization, so I’m unclear what changed. My production site does not repro this bug, however it hasn’t been pushed in a while. I’m afraid to try pushing right now as I believe it may introduce this issue to prod.
It looks like asset optimization was recently deprecated and removed. I have a feeling I might be experiencing a bug in the turn down process? The “asset optimization” button appears to have disappeared from Netlify’s site configuration, as I cannot find it even after searching for the option and clicking the result.
Is this Cloudfront link coming from something other than asset optimization, or am I correct that there is a bug here? Do I need to update my configuration in response to the deprecation? Anything else I might be doing wrong here?