Fix http auth and sdk errors
This commit is contained in:
1 parent
f705ee72cc
commit
cd19e7d3f8
15 files changed
+195
-252
No files matched your search
@@ -29,8 +29,8 @@ func ApiGuard(c *gin.Context) {
|
||||
func SwagGuard(c *gin.Context) {
|
||||
|
||||
if !args.Httpd.Swag && strings.HasPrefix(c.Request.URL.Path, "/swag") {
|
||||
c.Set("Error", gin.H{"Code": 403, "Message": "功能已禁用"})
|
||||
c.Set("ExitCode", 403)
|
||||
c.Header("Content-Type", "text/html; charset=utf-8")
|
||||
c.String(200, "功能已禁用")
|
||||
c.Abort()
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user