17 lines
719 B
TypeScript
17 lines
719 B
TypeScript
/** Every gateway route except `/files/*` sits under this prefix. */
|
|
export const API_VERSION_PATH = '/v1';
|
|
|
|
/**
|
|
* Where the browser reaches the API: this site's own origin, under this path. next.config.ts
|
|
* rewrites it to the gateway (`API_INTERNAL_ORIGIN`), so no browser request is cross-origin and
|
|
* the session cookies belong to this site (0018). The server render calls the gateway directly.
|
|
*/
|
|
export const API_PROXY_PATH = '/api';
|
|
|
|
/**
|
|
* How long the `/api` proxy waits for the gateway. Next.js stops at 30 seconds by default; an
|
|
* upload (two 5 MB ID images, post media) on a slow connection takes longer, and the HTTP lib
|
|
* sets no timeout for uploads.
|
|
*/
|
|
export const API_PROXY_TIMEOUT_MS = 120_000;
|