Files
vercel-labs__portless/turbo.json
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

34 lines
615 B
JSON

{
"$schema": "https://turbo.build/schema.json",
"tasks": {
"build": {
"dependsOn": ["^build"],
"outputs": ["dist/**", ".next/**"]
},
"dev": {
"cache": false,
"persistent": true
},
"test": {
"dependsOn": ["build"]
},
"test:e2e": {
"dependsOn": ["portless#build"],
"cache": false
},
"test:coverage": {
"dependsOn": ["build"],
"outputs": ["coverage/**"]
},
"test:watch": {
"cache": false,
"persistent": true
},
"type-check": {},
"lint": {},
"lint:fix": {
"cache": false
}
}
}