Set Google Storage Bucket's default cache control

前端 未结 6 1885
孤城傲影
孤城傲影 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:10

    If you're using a python app, you can use the option "default_expiration" in your app.yaml to set a global default value for the Cache-Control header: https://cloud.google.com/appengine/docs/standard/python/config/appref

    For example:

    runtime: python27   
    api_version: 1   
    threadsafe: yes
    
    default_expiration: "30s"
    

提交回复
热议问题