Skip to content

Commit

Permalink
fix: 因为反代 waline 加路径前缀会出现功能不正常,所以在没路径冲突的前提下,把内嵌 waline 的 uri 直接反代到根级别了
Browse files Browse the repository at this point in the history
  • Loading branch information
Mereithhh committed Aug 25, 2022
1 parent c58d717 commit 1c9aa3c
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 5 deletions.
20 changes: 18 additions & 2 deletions Caddyfile
Expand Up @@ -22,9 +22,25 @@
output file /var/log/vanblog-access.log
format json
}
handle /ui* {
reverse_proxy 127.0.0.1:8360
}
handle /user* {
reverse_proxy 127.0.0.1:8360
}
handle /token* {
reverse_proxy 127.0.0.1:8360
}
handle /db* {
reverse_proxy 127.0.0.1:8360
}
handle /comment* {
reverse_proxy 127.0.0.1:8360
}
reverse_proxy 127.0.0.1:8360
}
handle /oauth* {
reverse_proxy 127.0.0.1:8360
}

handle /static/* {
reverse_proxy 127.0.0.1:3000
}
Expand Down
16 changes: 15 additions & 1 deletion CaddyfileTemplate
Expand Up @@ -19,8 +19,22 @@
tls {
on_demand
}
handle /ui* {
reverse_proxy 127.0.0.1:8360
}
handle /user* {
reverse_proxy 127.0.0.1:8360
}
handle /token* {
reverse_proxy 127.0.0.1:8360
}
handle /db* {
reverse_proxy 127.0.0.1:8360
}
handle /comment* {
uri strip_prefix /comment
reverse_proxy 127.0.0.1:8360
}
handle /oauth* {
reverse_proxy 127.0.0.1:8360
}
handle /static/* {
Expand Down
2 changes: 1 addition & 1 deletion docs/ref/dev.md
Expand Up @@ -4,7 +4,7 @@ icon: vscode
---

:::info 提示
本项目处于初始阶段(自己都没捋顺),原则上暂不接受 `PR`
本项目处于初始阶段,如有 bug 请多担待。
:::
本项目使用了 `JavaScript``TypeScript` 实现。

Expand Down
2 changes: 1 addition & 1 deletion packages/admin/src/pages/CommentManage/index.jsx
Expand Up @@ -10,7 +10,7 @@ export default function () {
if (initialState?.version && initialState?.version == 'dev') {
return 'http://192.168.5.11:8360/ui';
} else {
return '/comment/ui';
return '/ui/';
}
}, [initialState]);
const showTips = () => {
Expand Down

0 comments on commit 1c9aa3c

Please sign in to comment.