🎨 Prevent setting access auth code in Docker containers

Signed-off-by: Daniel <845765@qq.com>
This commit is contained in:
Daniel 2026-01-14 20:29:32 +08:00
parent 9233eb8316
commit 90bcdaa3c2
No known key found for this signature in database
GPG key ID: 86211BA83DF03017

View file

@ -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