我使用谷歌應(yīng)用引擎來(lái)為我的 Laravel 應(yīng)用程序提供服務(wù),并想設(shè)置位于 Laravel 公共文件夾中的 javascript 和 css 文件的過期時(shí)間。js 和 css 文件的響應(yīng)頭:cache-control: max-age=600, public這是谷歌應(yīng)用引擎的默認(rèn)設(shè)置。但是在我的 app.yaml 中,我設(shè)置了以下內(nèi)容:runtime: phpenv: flexruntime_config:document_root: publicskip_files:- .env# I tried to set this to see if the error is in my handlers, but it was # still the default 10minsdefault_expiration: "30d"handlers:- url: /js/.* static_dir: public/js expiration: "30d"- url: /css/.* static_dir: public/css expiration: "30d"不知何故,我無(wú)法覆蓋谷歌的默認(rèn)值,老實(shí)說(shuō)我不知道更多。我已經(jīng)在 php.ini 中禁用了session.cache_limiter,就像這里建議的那樣 Laravel response Cache-Control headers always contains 'no-cache'還是沒有區(qū)別。
1 回答

慕后森
TA貢獻(xiàn)1802條經(jīng)驗(yàn) 獲得超5個(gè)贊
您正在使用 AppEngine 柔性環(huán)境:env: flex
不支持default_expiration
和expiration
,請(qǐng)嘗試使用標(biāo)準(zhǔn)環(huán)境。
- 1 回答
- 0 關(guān)注
- 157 瀏覽
添加回答
舉報(bào)
0/150
提交
取消