Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

fix: get `/api/feature` (#4440)

boojack6d46f1d47da8
diff --git a/backend/server/acl.go b/backend/server/acl.go
index c7723ee5f4..8f64125d6b 100644
--- a/backend/server/acl.go
+++ b/backend/server/acl.go
@@ -182,6 +182,11 @@ func aclMiddleware(s *Server, pathPrefix string, ce *casbin.Enforcer, next echo.
return next(c)
}
+ // Skip GET /feature request
+ if common.HasPrefixes(path, "/feature") && method == "GET" {
+ return next(c)
+ }
+
if readonly && method != "GET" {
return echo.NewHTTPError(http.StatusMethodNotAllowed, "Server is in readonly mode")
}
diff --git a/backend/server/jwt.go b/backend/server/jwt.go
index 23d6231862..59e0f22b81 100644
--- a/backend/server/jwt.go
+++ b/backend/server/jwt.go
@@ -134,6 +134,11 @@ func JWTMiddleware(pathPrefix string, principalStore *store.Store, next echo.Han
return next(c)
}
+ // Skip GET /feature request
+ if common.HasPrefixes(path, "/feature") && method == "GET" {
+ return next(c)
+ }
+
// Skips OpenAPI SQL endpoint
if common.HasPrefixes(c.Path(), fmt.Sprintf("%s/sql", openAPIPrefix)) {
return next(c)