This commit is contained in:
Vaica committed 2026-06-22 12:40:40 +08:00
1 parent b9bacffd05
commit f99ddec735
2 files changed
+11 -2

No files matched your search

+10 -1
View File
@@ -49,9 +49,18 @@ server {
}
# Hugo 预览代理(不需要认证)
# Hugo 静态资源
location ~ ^/(css|js|font|fonts|image/background|image/avatar|image/reward|emotion)/ {
auth_request off;
proxy_pass http://write-server:1313;
proxy_set_header Host $host;
}
# Hugo 页面预览
location /preview/ {
auth_request off;
proxy_pass http://write-server:1313/preview/;
rewrite ^/preview/(.*)$ /$1 break;
proxy_pass http://write-server:1313;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}
+1 -1
View File
@@ -18,7 +18,7 @@ class HugoManager {
this.starting = true;
this.ready = false;
this.process = spawn("hugo", ["server", "--bind", "0.0.0.0", "--port", "1313", "--baseURL", "/preview/", "--disableFastRender", "--noHTTPCache"], {
this.process = spawn("hugo", ["server", "--bind", "0.0.0.0", "--port", "1313", "--disableFastRender", "--noHTTPCache"], {
cwd: BLOG_ROOT,
shell: true,
stdio: "pipe",