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

资源路径能否改成相对路径? #37

Closed
e7 opened this issue Dec 20, 2020 · 2 comments
Closed

资源路径能否改成相对路径? #37

e7 opened this issue Dec 20, 2020 · 2 comments

Comments

@e7
Copy link

e7 commented Dec 20, 2020

css、js这些资源在nginx反代之后是访问的是绝对路径,虽说nginx的rewrite可以解决,但不熟正则的话得搞个半天

@nirui
Copy link
Owner

nirui commented Dec 21, 2020

抱歉了,就目前的实现方式而言,即使做出努力让Sshwifty去支持可配置的BaseURL,最终的结果不但对用户而言得益不大,同时还降低了安全性并提高了代码的维护成本。所以就当前的情况而言,项目大概不会做出这些努力了。

如果你需要将Sshwifty部署到二级目录,同时不想使用rewrite,那么可以考虑通过修改源代码并重新构建的方式来完成。Sshwifty的前端资源和后端的接口都有/sshwifty的前缀,你可以在代码里搜索并替换这些前缀来将他们更改到你想要的目录名。

@e7
Copy link
Author

e7 commented Dec 22, 2020

好的感谢!

@e7 e7 closed this as completed Dec 22, 2020
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

2 participants