Merge pull request #230 from router-for-me/api

fix(management): exclude disabled runtime-only auths from file entries
This commit is contained in:
Luis Pater
2025-11-10 08:34:47 +08:00
committed by GitHub

View File

@@ -293,6 +293,9 @@ func (h *Handler) buildAuthFileEntry(auth *coreauth.Auth) gin.H {
return nil
}
runtimeOnly := isRuntimeOnlyAuth(auth)
if runtimeOnly && (auth.Disabled || auth.Status == coreauth.StatusDisabled) {
return nil
}
path := strings.TrimSpace(authAttribute(auth, "path"))
if path == "" && !runtimeOnly {
return nil