Documentation
¶
Overview ¶
Package proxy implements the reverse proxy that fronts the user's live local server in prereview's --external mode: it strips framing/CSP blockers from HTML navigations and injects a postMessage beacon so the prereview UI can iframe the page and track navigation, scroll, and annotation focus.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewExternalProxy ¶
NewExternalProxy builds the reverse proxy that fronts the user's live local server in `--external` mode. It runs on its OWN port (a separate origin from the prereview UI) so the app's root-relative URLs (`/api/…`, `/@vite/client`, its own websocket) resolve against the proxy root and forward cleanly with zero URL rewriting — the make-or-break property a same-origin path-prefix proxy can't provide. httputil.ReverseProxy upgrades websockets natively.
For HTML navigations it strips framing/CSP blockers (so the page can be iframed by the UI) and injects proxyBeaconJS before </body>.
Types ¶
This section is empty.