I’m not following what you’re trying. By looking at the toml file, it appears as if you’re trying to set a custom header only when the file is served with a 304 status. Not only this won’t work (as it’s not currently supported), I’m not sure what this will solve.
This is trying to work around a bug in Netlify. According to RFC 7232 The 304 response “MUST generate any of the following header fields that would have been sent in a 200 (OK) response to the same request: Cache-Control, Content-Location, Date, ETag, Expires, and Vary.” Netlify doesn’t do this so @jasikpark is attempting to hack around this by setting the Cache-Control header manually.
It doesn’t make sense to support it either because the RFC says what headers should be present and that they should match the values from the 200 response. Configuring the headers differently is invalid. But it would be nice to get this bug fixed.
I have a similar use case where I’d like to control the caching. Initial request works fine, but it seems the etag is used in requests after a refresh and then I get stuck in a 304 loop.