17 lines · 780 B · TypeScript
RawDownload
/** * Backend paths the web dev server proxies in single-origin browser dev. * * Two consumers must agree on this list: the Vite proxy map * (apps/web/vite.config.ts) that forwards these to the backend, and the * server's dev catch-all (apps/server/src/http.ts) that 404s them instead of * redirecting back to Vite. Drift is silent and nasty in both directions — a * prefix only Vite knows gets answered with index.html; a prefix only the * server knows redirect-loops through the proxy. */export const DEV_PROXIED_PATH_PREFIXES = ["/api", "/oauth", "/.well-known", "/ws"] as const; export function isDevProxiedPath(pathname: string): boolean {  return DEV_PROXIED_PATH_PREFIXES.some(    (prefix) => pathname === prefix || pathname.startsWith(`${prefix}/`),  );}

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t