UNPKG

@stacksjs/rpx

Version:

A modern and smart reverse proxy.

20 lines (19 loc) 1.06 kB
/** * The interstitial pages rpx serves while an on-demand site boots (or after it * fails). Plain server-rendered HTML with a `<meta http-equiv="refresh">` so the * browser re-requests on its own — no client JS — and the moment the site's * routes are published the refresh lands on the real app instead. */ /** Escape the five HTML-significant characters for safe interpolation. */ export declare function escapeHtml(value: string): string; /** * The "starting…" splash (HTTP 503 + `Retry-After`). Auto-refreshes until the * site's routes go live, at which point the refresh hits the real app. Shows the * tail of the boot log so progress is visible while waiting. */ export declare function renderStartingPage(opts: { host: string, sinceMs: number, logTail?: string }): Response; /** * The failure page (HTTP 502). Shows the tail of the site's log and keeps a slow * refresh so a fix + restart is picked up without a manual reload. */ export declare function renderFailedPage(opts: { host: string, error: string, logTail: string }): Response;