1231
This commit is contained in:
1 parent
e0cb7be323
commit
b9bacffd05
2 files changed
+2
-3
No files matched your search
@@ -51,8 +51,7 @@ server {
|
|||||||
# Hugo 预览代理(不需要认证)
|
# Hugo 预览代理(不需要认证)
|
||||||
location /preview/ {
|
location /preview/ {
|
||||||
auth_request off;
|
auth_request off;
|
||||||
rewrite ^/preview/(.*)$ /$1 break;
|
proxy_pass http://write-server:1313/preview/;
|
||||||
proxy_pass http://write-server:1313;
|
|
||||||
proxy_set_header Host $host;
|
proxy_set_header Host $host;
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ class HugoManager {
|
|||||||
this.starting = true;
|
this.starting = true;
|
||||||
this.ready = false;
|
this.ready = false;
|
||||||
|
|
||||||
this.process = spawn("hugo", ["server", "--bind", "0.0.0.0", "--port", "1313", "--disableFastRender", "--noHTTPCache"], {
|
this.process = spawn("hugo", ["server", "--bind", "0.0.0.0", "--port", "1313", "--baseURL", "/preview/", "--disableFastRender", "--noHTTPCache"], {
|
||||||
cwd: BLOG_ROOT,
|
cwd: BLOG_ROOT,
|
||||||
shell: true,
|
shell: true,
|
||||||
stdio: "pipe",
|
stdio: "pipe",
|
||||||
|
|||||||
Reference in new issue
Block a user