mirror of
https://github.com/Rain-kl/OpenFlare.git
synced 2026-10-11 17:56:37 +08:00
[优化] 修复基本鉴权逻辑,确保 Lua 块正确关闭并添加相关测试用例
This commit is contained in:
@@ -1135,7 +1135,7 @@ func renderBasicAuthBlock(enabled bool, username, password string) string {
|
||||
if auth ~= "Basic %s" then
|
||||
ngx.header["WWW-Authenticate"] = 'Basic realm="Restricted"'
|
||||
return ngx.exit(401)
|
||||
}
|
||||
end
|
||||
}
|
||||
`, encoded)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user