unable to set cache expiration on in app.yaml for a python app

前端 未结 2 1264
孤独总比滥情好
孤独总比滥情好 2021-01-16 07:14

In my GAE app I am serving static content as follows (those are my entries in my app.yaml file):

handlers:
- url: /c         


        
2条回答
  •  别那么骄傲
    2021-01-16 07:56

    After the hint from Martijn above I changed expiration values in my app.yaml to:

    handlers:
    
    - url: /css
    
      static_dir: static/css
    
      expiration: "0d 10m"
    
    
    
    - url: /js
    
      static_dir: static/js
    
      expiration: "0d 10m"
    

    Now everything works as expected and the I get the following headers in response:

    cache-control:public, max-age=600
    content-encoding:gzip
    

    Everything seems to work as expected now.

提交回复
热议问题