Skip to content

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

Returns 401 if missing access token so the client can automatically log out

天舟1f8112f9af41
diff --git a/server/jwt.go b/server/jwt.go
index 9b4d5f2c70..584c8e6bc1 100644
--- a/server/jwt.go
+++ b/server/jwt.go
@@ -161,7 +161,7 @@ func JWTMiddleware(l *zap.Logger, p api.PrincipalService, next echo.HandlerFunc,
cookie, err := c.Cookie(accessTokenCookieName)
if err != nil {
- return echo.NewHTTPError(http.StatusBadRequest, "Missing access token")
+ return echo.NewHTTPError(http.StatusUnauthorized, "Missing access token")
}
claims := &Claims{}