I have a problem with ETag response headers being inconsistent, or to be more specific, not present. Currently, I am using Google Cloud CDN to deliver the resources from Google Cloud Storage (bucket). When the resource is read directly from the bucket, the ETag is present, however, if the resource is obtained through the CDN the ETag is missing.
From the research I was able to do, it has to do with the fact that the caching of application/json files is not happening by default.
“If you want to cache text/html and application/json content types, you must set explicit Cache-Control headers in the response, being careful not to accidentally cache one user’s data and serve it to all users.” – https://cloud.google.com/cdn/docs/caching
Here is a sample list of response headers of a resource that doesn’t include the Etag header:
There are a number of other headers present but I do not believe them to be important for the matter at hand.
The question is, is there a Google Cloud CDN setting that is preventing the caching or ETags from showing in the response headers?
If any more information is needed to make this a bit more clear, please let me know so I can try and provide it.