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

38 lines
926 B
JSON

{
"name": "portless-monorepo",
"private": true,
"type": "module",
"packageManager": "pnpm@9.15.4",
"scripts": {
"build": "turbo build",
"dev": "turbo dev",
"format": "prettier --write .",
"format:check": "prettier --check .",
"lint": "turbo lint",
"lint:fix": "turbo lint:fix",
"test": "turbo test",
"test:e2e": "turbo test:e2e",
"test:coverage": "turbo test:coverage",
"test:watch": "turbo test:watch",
"type-check": "turbo type-check",
"prepare": "husky"
},
"devDependencies": {
"@eslint/js": "^9.39.2",
"eslint": "^9.39.2",
"eslint-config-prettier": "^10.1.8",
"husky": "^9.1.7",
"lint-staged": "^16.2.7",
"prettier": "^3.8.1",
"turbo": "^2.8.10",
"typescript-eslint": "^8.55.0"
},
"lint-staged": {
"*.{ts,js}": [
"eslint --fix",
"prettier --write"
],
"*.{json,md,yml,yaml}": "prettier --write"
}
}