fix(gateway): allow Mattermost slash callback without bearer auth

This commit is contained in:
Echo
2026-02-15 03:47:50 -05:00
committed by Muhammed Mukhthar CM
parent 434dc0ffd5
commit 57e29cae5c

View File

@@ -84,6 +84,7 @@ const GATEWAY_PROBE_STATUS_BY_PATH = new Map<string, "live" | "ready">([
["/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 (