解決vue項目發佈客戶端緩存html導致js請求404故障

nginx配置/及.html結尾的請求,響應頭添加Cache-Control no-store

location / {
            if ($request_uri ~* '/$|\.html$') {
                  add_header Cache-Control no-store;
            }
            root  html;
            index index.html;
        }

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章