我使用谷歌應(yīng)用引擎來為我的 Laravel 應(yīng)用程序提供服務(wù),并想設(shè)置位于 Laravel 公共文件夾中的 javascript 和 css 文件的過期時間。js 和 css 文件的響應(yīng)頭:cache-control: max-age=600, public這是谷歌應(yīng)用引擎的默認設(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"不知何故,我無法覆蓋谷歌的默認值,老實說我不知道更多。我已經(jīng)在 php.ini 中禁用了session.cache_limiter,就像這里建議的那樣 Laravel response Cache-Control headers always contains 'no-cache'還是沒有區(qū)別。
1 回答

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