Skip to content

Commit

Permalink
🎉 version(architecture): v0.3
Browse files Browse the repository at this point in the history
  • Loading branch information
Ting-Code committed Aug 20, 2024
1 parent eadfcba commit 323d776
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion .github/workflows/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ http {
server_name 139.199.173.241;
# location /docs 则最后不加/
# location /docs/ 则最后加/
location /docs {
location / {
if ($request_filename ~* .*\.(?:htm|html)$) ## 配置页面不缓存html和htm结尾的文件
{
add_header Cache-Control "private, no-store, no-cache, must-revalidate, proxy-revalidate";
Expand All @@ -101,6 +101,18 @@ http {
# 尝试从磁盘找到请求的文件,如果不存在则跳转到 index.html
try_files $uri $uri/ /index.html;
}
location /docs {
if ($request_filename ~* .*\.(?:htm|html)$) ## 配置页面不缓存html和htm结尾的文件
{
add_header Cache-Control "private, no-store, no-cache, must-revalidate, proxy-revalidate";
}
# 把匹配到的路径重写, 注意要以/结尾
alias /usr/share/nginx/html/docs;
# 默认首页
index index.html;
# 尝试从磁盘找到请求的文件,如果不存在则跳转到 index.html
try_files $uri $uri/ /index.html;
}
}
}

0 comments on commit 323d776

Please sign in to comment.