mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-17 14:15:29 +01:00
🎨 Prevent setting access auth code in Docker containers
Signed-off-by: Daniel <845765@qq.com>
This commit is contained in:
parent
9233eb8316
commit
90bcdaa3c2
1 changed files with 6 additions and 0 deletions
|
|
@ -603,6 +603,12 @@ func setAccessAuthCode(c *gin.Context) {
|
|||
ret := gulu.Ret.NewResult()
|
||||
defer c.JSON(http.StatusOK, ret)
|
||||
|
||||
if util.ContainerDocker == util.Container {
|
||||
ret.Code = -1
|
||||
ret.Msg = "access auth code cannot be set in Docker container"
|
||||
return
|
||||
}
|
||||
|
||||
arg, ok := util.JsonArg(c, ret)
|
||||
if !ok {
|
||||
return
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue