♻️ 通过域名 siyuan.localhost 加载 https://github.com/siyuan-note/siyuan/issues/6368

This commit is contained in:
Liang Ding 2022-10-27 09:47:03 +08:00
parent f8d01913a4
commit 8bc889659b
No known key found for this signature in database
GPG key ID: 136F30F901A2231D
19 changed files with 38 additions and 47 deletions

View file

@ -171,7 +171,7 @@ func CheckAuth(c *gin.Context) {
}
// 放过来自本机的某些请求
if strings.HasPrefix(c.Request.RemoteAddr, "127.0.0.1") {
if strings.HasPrefix(c.Request.RemoteAddr, util.LocalHost) || strings.HasPrefix(c.Request.RemoteAddr, "127.0.0.1") {
if strings.HasPrefix(c.Request.RequestURI, "/assets/") || strings.HasPrefix(c.Request.RequestURI, "/history/assets/") {
c.Next()
return