Files
Chris Tate 8592bbc1e9 Rewrite Origin/Referer headers in proxy for portless-managed hostnames (#189)
* Rewrite Origin/Referer headers in proxy for portless-managed hostnames

- Frameworks like Next.js 16.2+ block cross-origin requests to dev endpoints (e.g. /_next/webpack-hmr) when the Origin header doesn't match their allowlist. Next.js auto-allows *.localhost, but * only matches a single subdomain level, so multi-level names like admin.cmd.localhost are blocked.
- The proxy now rewrites Origin and Referer headers to http://localhost:{port} when the hostname belongs to the portless TLD. The original host is preserved in X-Forwarded-Host.
- This is framework-agnostic and works for both HTTP requests and WebSocket upgrades (HMR), so any framework with dev-origin checks benefits automatically.

* increase timeout
2026-04-01 17:49:02 -05:00
..