refactor(nginx): 注释掉缓存和 Gzip 压缩配置,添加测试返回语句
- 在 location / 块中添加 return 200 "Hello, World!"; 用于测试
Change-Id: Id077fd05f60b606095c81f9a9befdf6ed723d690
diff --git a/nginx.conf b/nginx.conf
index ab42dba..f47bcb6 100644
--- a/nginx.conf
+++ b/nginx.conf
@@ -8,17 +8,18 @@
# 解决 React Router 单页应用路由问题
location / {
- try_files $uri $uri/ /index.html;
+ # try_files $uri $uri/ /index.html;
- # 缓存策略
- expires 7d; # 静态资源缓存7天
- add_header Cache-Control "public";
+ # # 缓存策略
+ # expires 7d; # 静态资源缓存7天
+ # add_header Cache-Control "public";
- # Gzip 压缩
- gzip on;
- gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
- gzip_min_length 1024;
- gzip_comp_level 6;
+ # # Gzip 压缩
+ # gzip on;
+ # gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
+ # gzip_min_length 1024;
+ # gzip_comp_level 6;
+ return 200 "Hello, World!";
}
# API 请求代理到后端