소스 검색

feat: update nginx.conf 使用固定编译入口可能导致浏览器使用缓存js文件,而此配置可以解决 (#3045)

胤玄 1 년 전
부모
커밋
556575f501
1개의 변경된 파일3개의 추가작업 그리고 0개의 파일을 삭제
  1. 3 0
      nginx.conf

+ 3 - 0
nginx.conf

@@ -30,6 +30,9 @@ http {
                 add_header 'Content-Length' 0;
                 add_header 'Content-Length' 0;
                 return 204;
                 return 204;
             }
             }
+            if ($request_filename ~* ^.*?.(html|htm|js)$) {
+              add_header Cache-Control no-cache;
+            }
         }
         }
     }
     }
 }
 }