Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
chore: skip body limit and skip timeout limit for webhook and sheet api (#5216)
Danny Xu5d64dc14ab9b
diff --git a/backend/server/server.go b/backend/server/server.goindex e8f5a8dff6..96b3279341 100644--- a/backend/server/server.go+++ b/backend/server/server.go@@ -323,12 +323,13 @@ func NewServer(ctx context.Context, profile config.Profile) (*Server, error) {e.HidePort = truee.Use(middleware.TimeoutWithConfig(middleware.TimeoutConfig{Skipper: func(c echo.Context) bool {- // Skip grpc calls.- return strings.HasPrefix(c.Request().URL.Path, "/bytebase.v1.")+ // Skip grpc and webhook calls.+ return strings.HasPrefix(c.Request().URL.Path, "/bytebase.v1.") ||+ strings.HasPrefix(c.Request().URL.Path, webhookAPIPrefix) ||+ strings.HasPrefix(c.Request().URL.Path, "/api/sheet/")},Timeout: 30 * time.Second,}))- e.Use(middleware.BodyLimit("5M"))e.Use(middleware.RateLimiterWithConfig(middleware.RateLimiterConfig{Store: middleware.NewRateLimiterMemoryStoreWithConfig(middleware.RateLimiterMemoryStoreConfig{Rate: 30, Burst: 60, ExpiresIn: 3 * time.Minute},