Set Google Storage Bucket's default cache control

前端 未结 6 1925
孤城傲影
孤城傲影 2021-01-11 16:41

Is there any way to set Bucket\'s default cache control (trying to override the public, max-age=3600 in bucket level every time creating a new object)

S

6条回答
  •  独厮守ぢ
    2021-01-11 17:13

    Using gsutil

    • -h: Allows you to specify certain HTTP headers
    • -r: Recursive
    • -m: To performing a sequence of gsutil operations that may run significantly faster.

    gsutil -m setmeta -r -h "Cache-control:public, max-age=259200" gs://bucket-name

提交回复
热议问题