apps/gateway/src/utils/routes.ts
Metadata
- Purpose: Source artifact in the anchor-msp system.
- Domain:
applications - Language:
ts - Bytes: 623
- Lines: 21
- Content hash (short):
6c0b92e2 - Source (start): apps/gateway/src/utils/routes.ts:1
- Source (end): apps/gateway/src/utils/routes.ts:21
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));
}