diff --git a/src/gateway/server-http.ts b/src/gateway/server-http.ts index ef0e56dd6d9..c6c0cabd1ff 100644 --- a/src/gateway/server-http.ts +++ b/src/gateway/server-http.ts @@ -84,6 +84,7 @@ const GATEWAY_PROBE_STATUS_BY_PATH = new Map([ ["/ready", "ready"], ["/readyz", "ready"], ]); +const MATTERMOST_SLASH_CALLBACK_PATH = "/api/channels/mattermost/command"; function shouldEnforceDefaultPluginGatewayAuth(pathContext: PluginRoutePathContext): boolean { return ( @@ -189,6 +190,9 @@ function buildPluginRequestStages(params: { { name: "plugin-auth", run: async () => { + if (params.requestPath === MATTERMOST_SLASH_CALLBACK_PATH) { + return false; + } const pathContext = params.pluginPathContext ?? resolvePluginRoutePathContext(params.requestPath); if (