【发布时间】:2019-05-20 11:24:52
【问题描述】:
我使用谷歌应用引擎来服务我的 laravel 应用程序,并想设置我位于 laravel 公用文件夹中的 javascript 和 css 文件的到期时间。
js和css文件的响应头:
cache-control: max-age=600, public
这是谷歌应用引擎的默认设置。
但在我的 app.yaml 中,我设置了以下内容:
runtime: php
env: flex
runtime_config:
document_root: public
skip_files:
- .env
# I tried to set this to see if the error is in my handlers, but it was
# still the default 10mins
default_expiration: "30d"
handlers:
- url: /js/.*
static_dir: public/js
expiration: "30d"
- url: /css/.*
static_dir: public/css
expiration: "30d"
不知何故,我无法覆盖谷歌的默认设置,老实说,我不知道更多。
我已经在 php.ini 中禁用了 session.cache_limiter,就像这里建议的 Laravel response Cache-Control headers always containing 'no-cache'
还是没有区别。
【问题讨论】:
标签: php laravel google-app-engine cache-control app.yaml