mirror of
https://github.com/vercel-labs/portless.git
synced 2026-09-14 16:37:59 +08:00
8592bbc1e9
* 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
34 lines
615 B
JSON
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
|
|
}
|
|
}
|
|
}
|