Disable caching of a single file with try_files directive

后端 未结 6 777
情书的邮戳
情书的邮戳 2021-02-01 16:42

I\'m serving Angular 2 application with nginx using location section this way:

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

try_file

6条回答
  •  南笙
    南笙 (楼主)
    2021-02-01 17:19

    location / {
      try_files $uri $uri/ /index.html;
    }
    
    location = /index.html {
      expires -1;
    }
    

提交回复
热议问题