Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

有没有可能给web管理带个 path ? #10

Open
coder-free opened this issue Sep 11, 2020 · 2 comments
Open

有没有可能给web管理带个 path ? #10

coder-free opened this issue Sep 11, 2020 · 2 comments

Comments

@coder-free
Copy link

打开域名直接出现trojan管理登录页面有些不安全,是不是加个 path 好点?然后这个path允许用户自定义。
https://a.com/mytrojan 类似于这样
这样的话 nginx 也好配置一些,碰到这个path就转发给 trojan-web,否则 nginx 自己处理。
像 wiki 那样配置,所有 js css 都会转给 trojan-web 这样会影响原有的部署。

@coder-free
Copy link
Author

const publicPath = process.env.NODE_ENV === 'production' ? '/' : '/'

这里改成 const publicPath = process.env.NODE_ENV === 'production' ? './' : '/' 的话,只需要在所有静态资源外部包一层目录,就能实现额外的一个 path。

@ghost
Copy link

ghost commented Dec 28, 2020

@coder-free 好问题,我也有此需求,要隐藏管理面板就会遇到。你那边既然已经知道怎么改了,可以直接提交PR吗,谢谢?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant