账号密码登录
微信安全登录
微信扫描二维码登录

登录后绑定QQ、微信即可实现信息互通

手机验证码登录
找回密码返回
邮箱找回 手机找回
注册账号返回
其他登录方式
分享
  • 收藏
    X
    vue-cli的pwa模板,生产环境的nginx配置该怎么写?
    29
    0

    vue-router的history模式要求写成

    location / {
      try_files $uri $uri/ /index.html;
    }

    vue-cli的pwa模板的文档要求配置一些有关缓存的选项

    location ~ (index.html|service-worker.js)$ {
      # ...
      add_header Last-Modified $date_gmt;
      add_header Cache-Control 'no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0';
      if_modified_since off;
      expires off;
      etag off;
    }

    对nginx并不熟悉,我把这两个都写上的时候,似乎只能生效一个,求指点应该怎么写

    0
    打赏
    收藏
    点击回答
        全部回答
    • 0
    更多回答
    扫一扫访问手机版
    • 回到顶部
    • 回到顶部