mirror of
https://github.com/different-ai/openwork
synced 2026-04-25 17:15:34 +02:00
fix(den): trust 0.0.0.0 local auth origin (#1192)
This commit is contained in:
@@ -79,7 +79,7 @@ Optional env vars (via `.env` or `export`):
|
||||
- `DEN_PUBLIC_HOST` — host name/IP used for default auth URL + printed LAN/public URLs (defaults to your machine hostname)
|
||||
- `DEN_BETTER_AUTH_URL` — browser-facing auth base URL (defaults to `http://$DEN_PUBLIC_HOST:<DEN_WEB_PORT>`)
|
||||
- `DEN_BETTER_AUTH_TRUSTED_ORIGINS` — trusted origins for Better Auth (defaults to `DEN_CORS_ORIGINS`)
|
||||
- `DEN_CORS_ORIGINS` — trusted origins for Express CORS (defaults include hostname, localhost, loopback, and detected LAN IPv4)
|
||||
- `DEN_CORS_ORIGINS` — trusted origins for Express CORS (defaults include hostname, localhost, `127.0.0.1`, `0.0.0.0`, and detected LAN IPv4)
|
||||
- `DEN_PROVISIONER_MODE` — `stub` or `render` (defaults to `stub`)
|
||||
- `DEN_WORKER_URL_TEMPLATE` — stub worker URL template with `{workerId}` placeholder
|
||||
|
||||
|
||||
@@ -140,7 +140,7 @@ DEN_BETTER_AUTH_URL="${DEN_BETTER_AUTH_URL:-http://$PUBLIC_HOST:$DEN_WEB_PORT}"
|
||||
DEN_PROVISIONER_MODE="${DEN_PROVISIONER_MODE:-stub}"
|
||||
DEN_WORKER_URL_TEMPLATE="${DEN_WORKER_URL_TEMPLATE:-https://workers.local/{workerId}}"
|
||||
DEN_DAYTONA_WORKER_PROXY_BASE_URL="${DEN_DAYTONA_WORKER_PROXY_BASE_URL:-http://$PUBLIC_HOST:$DEN_WORKER_PROXY_PORT}"
|
||||
DEN_CORS_ORIGINS="${DEN_CORS_ORIGINS:-http://localhost:$DEN_WEB_PORT,http://127.0.0.1:$DEN_WEB_PORT,http://localhost:$DEN_API_PORT,http://127.0.0.1:$DEN_API_PORT}"
|
||||
DEN_CORS_ORIGINS="${DEN_CORS_ORIGINS:-http://localhost:$DEN_WEB_PORT,http://127.0.0.1:$DEN_WEB_PORT,http://0.0.0.0:$DEN_WEB_PORT,http://localhost:$DEN_API_PORT,http://127.0.0.1:$DEN_API_PORT}"
|
||||
append_origin "http://$PUBLIC_HOST:$DEN_WEB_PORT"
|
||||
append_origin "http://$PUBLIC_HOST:$DEN_API_PORT"
|
||||
append_origin "http://$PUBLIC_HOST:$DEN_WORKER_PROXY_PORT"
|
||||
|
||||
@@ -70,7 +70,7 @@ services:
|
||||
BETTER_AUTH_URL: ${DEN_BETTER_AUTH_URL:-http://localhost:3005}
|
||||
DEN_BETTER_AUTH_TRUSTED_ORIGINS: ${DEN_BETTER_AUTH_TRUSTED_ORIGINS:-}
|
||||
PORT: "8788"
|
||||
CORS_ORIGINS: ${DEN_CORS_ORIGINS:-http://localhost:3005,http://127.0.0.1:3005,http://localhost:8788,http://127.0.0.1:8788}
|
||||
CORS_ORIGINS: ${DEN_CORS_ORIGINS:-http://localhost:3005,http://127.0.0.1:3005,http://0.0.0.0:3005,http://localhost:8788,http://127.0.0.1:8788}
|
||||
PROVISIONER_MODE: ${DEN_PROVISIONER_MODE:-stub}
|
||||
WORKER_URL_TEMPLATE: ${DEN_WORKER_URL_TEMPLATE:-}
|
||||
POLAR_FEATURE_GATE_ENABLED: "false"
|
||||
|
||||
@@ -19,6 +19,7 @@ function detectWebOrigins() {
|
||||
const origins = new Set([
|
||||
`http://localhost:${webPort}`,
|
||||
`http://127.0.0.1:${webPort}`,
|
||||
`http://0.0.0.0:${webPort}`,
|
||||
])
|
||||
|
||||
for (const entries of Object.values(os.networkInterfaces())) {
|
||||
|
||||
@@ -45,6 +45,7 @@ const port = process.env.WEB_PORT;
|
||||
const origins = new Set([
|
||||
`http://localhost:${port}`,
|
||||
`http://127.0.0.1:${port}`,
|
||||
`http://0.0.0.0:${port}`,
|
||||
]);
|
||||
|
||||
for (const entries of Object.values(os.networkInterfaces())) {
|
||||
|
||||
Reference in New Issue
Block a user