Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions deployment/nginx/cv.location.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Include inside each HTTPS server block after placing the authorized PDF at this path.
location = /cv {
alias /opt/babelflux/public/cv.pdf;
default_type application/pdf;
add_header Content-Disposition "inline" always;
add_header X-Content-Type-Options nosniff always;
}
4 changes: 4 additions & 0 deletions docs/deployment/babelflux-icu.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
- 后端:`babelflux.service`,`127.0.0.1:8000`
- 前端:Nginx `:80`,`babelflux.icu` / `www.babelflux.icu`
- 配置:`/etc/babelflux/babelflux.env`、`/etc/systemd/system/babelflux.service`、`/etc/nginx/sites-available/babelflux`
- 简历预览:授权 PDF 位于服务器 `/opt/babelflux/public/cv.pdf`,通过 Nginx 精确 location `/cv` 内联提供;文件不进入 Git。

### 实测结果

Expand Down Expand Up @@ -57,3 +58,6 @@ ln -sfn /opt/babelflux/releases/<previous-version> /opt/babelflux/current
systemctl start babelflux
nginx -t && systemctl reload nginx
```

简历入口回退时只需移除两个 HTTPS server 中的 `deployment/nginx/cv.location.conf`
对应 location 并 reload Nginx,不影响 BabelFlux 应用发布和数据卷。
Loading