Skip to main content

apps/gateway/src/utils/routes.ts

Metadata

Indexed Symbols

  • isPublicRoute (line 14, function) - Implements is public route for module behavior.
  • isNonTenantRoute (line 18, function) - Implements is non tenant route for module behavior.

Markdown Headings (if applicable)

No markdown headings detected.

Source Preview

export const publicRoutePrefixes = [
"/health",
"/api/v1/health",
"/.well-known/engine-status",
"/api/v1/openapi",
"/api/v1/portal/session/exchange",
"/api/v1/portal/session/terminate",
"/api/v1/webhooks/workflow-completed",
"/api/v1/integrations/github/webhook"
] as const;

export const nonTenantRoutePrefixes = ["/api/v1/platform"] as const;

export function isPublicRoute(url: string): boolean {
return publicRoutePrefixes.some((prefix) => url.startsWith(prefix));
}

export function isNonTenantRoute(url: string): boolean {
return nonTenantRoutePrefixes.some((prefix) => url.startsWith(prefix));
}