mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-16 22:50:13 +01:00
🐛 Authentication middleware compatible (#9720)
This commit is contained in:
parent
1e9a00a039
commit
f38c52292b
2 changed files with 25 additions and 5 deletions
|
|
@ -162,6 +162,12 @@ func CheckAuth(c *gin.Context) {
|
|||
|
||||
// 未设置访问授权码
|
||||
if "" == Conf.AccessAuthCode {
|
||||
// Skip the empty access authorization code check https://github.com/siyuan-note/siyuan/issues/9709
|
||||
if util.SIYUAN_ACCESS_AUTH_CODE_BYPASS {
|
||||
c.Next()
|
||||
return
|
||||
}
|
||||
|
||||
// Authenticate requests with the Origin header other than 127.0.0.1 https://github.com/siyuan-note/siyuan/issues/9180
|
||||
clientIP := c.ClientIP()
|
||||
host := c.GetHeader("Host")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue