I tried to set Cache-Control header for Google Cloud Storage bucket. It gives me 400: Invalid argument error
without any explanation what exactly wrong. Any ideas?
Example:
gsutil setmeta -R -h 'Cache-Control:public, max-age=10000, no-transform' gs://example.com/stylesheets/
Setting metadata on gs://example.com/stylesheets/site-77ee6060.css
BadRequestException: 400 Invalid argument
Tried with different max-age
, with or without no-transform
, same result.
bucket is configured as website.
In the Google Cloud console, go to the Cloud CDN page. Under Associated load balancers, click the load balancer name. Click the Cache invalidation tab.
A cacheable response is an HTTP response that Cloud CDN can store and quickly retrieve, thus allowing for faster load times.
I had this issue, and discovered that I did not have OWNER
permission on the object anymore (someone else on my team had edited the object).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With