Skip to content

Commit e5f721e

Browse files
authored
Align the TRUSTED_ORIGINS fallback with the port the app is actually served on (#313)
The app runs on 3010, and .env.example says so, but the fallback used when TRUSTED_ORIGINS is unset named 3000. A deployment that never set the variable trusted an origin nothing serves and refused the one that does.
1 parent 92014a8 commit e5f721e

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

server/src/config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -502,7 +502,7 @@ function authConfig(
502502
secret,
503503
trustedOrigins: commaSeparated(environment, "TRUSTED_ORIGINS").length
504504
? commaSeparated(environment, "TRUSTED_ORIGINS")
505-
: ["http://localhost:3000"],
505+
: ["http://localhost:3010"],
506506
initialAdminEmails,
507507
...(google ? { google } : {}),
508508
...(microsoft ? { microsoft } : {}),

server/tests/config.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ describe("deployment configuration", () => {
196196
clientId: "google-client-id",
197197
clientSecret: "google-client-secret",
198198
},
199-
trustedOrigins: ["http://localhost:3000"],
199+
trustedOrigins: ["http://localhost:3010"],
200200
initialAdminEmails: ["admin@openbot.test", "owner@openbot.test"],
201201
});
202202
});

0 commit comments

Comments
 (0)