修复切换版本跳转被浏览器缓存的旧 301 劫持
Deploy Resume / deploy (push) Successful in 2m23s

旧站点 / → 301 /resume/ 曾被浏览器缓存,普通窗口点击切换入口命中缓存
跳转链(无痕正常)。导航入口改用无缓存历史的 /index.html,
并为 HTML 响应加 Cache-Control: no-cache 防止复发
This commit is contained in:
2026-11-03 13:49:31 +08:00
parent eea7d1b28b
commit a7ea024737
3 changed files with 6 additions and 3 deletions
+3
View File
@@ -5,6 +5,9 @@ server {
root /usr/share/nginx/html;
index index.html;
# HTML 不缓存(旧站点 301 曾被浏览器缓存导致跳转异常;同时保证面试官看到最新简历)
add_header Cache-Control "no-cache";
# 共享静态资源
location /css/ {
alias /usr/share/nginx/html/css/;
+2 -2
View File
@@ -14,12 +14,12 @@
<link rel="stylesheet" href="/css/theme-{{theme}}.css">
</head>
<body>
<a class="version-switch" href="/">⇄ 切换简历版本</a>
<a class="version-switch" href="/index.html">⇄ 切换简历版本</a>
<div class="page">
{{{headerHtml}}}
{{{bodyHtml}}}
<div class="page-footer">
<a href="/">简历导航(其他版本)</a>
<a href="/index.html">简历导航(其他版本)</a>
<a href="{{pdfUrl}}" target="_blank">PDF 版</a>
<a href="{{txtUrl}}">纯文本版</a>
<span class="footer-hint">打印 / 另存 PDF:浏览器 Ctrl+P</span>
+1 -1
View File
@@ -26,7 +26,7 @@
{{/each}}{{/each}}
</ul>
<a href="/" class="back-link">← 返回简历导航</a>
<a href="/index.html" class="back-link">← 返回简历导航</a>
</div>
</body>
</html>