fix(api): use TRUSTED_ORIGINS for socket.io gateway CORS (#628)

Co-authored-by: Jason Woltje <[email protected]>
Co-committed-by: Jason Woltje <[email protected]>
This commit is contained in:
2026-03-01 20:13:13 +00:00
committed by jason.woltje
parent c5253e9d62
commit c23c33b0c5
3 changed files with 24 additions and 2 deletions
+3 -1
View File
@@ -66,7 +66,9 @@ interface StartTranscriptionPayload {
@WSGateway({
namespace: "/speech",
cors: {
origin: process.env.WEB_URL ?? "http://localhost:3000",
origin: (process.env.TRUSTED_ORIGINS ?? process.env.WEB_URL ?? "http://localhost:3000")
.split(",")
.map((s) => s.trim()),
credentials: true,
},
})
+3 -1
View File
@@ -63,7 +63,9 @@ interface AuthenticatedSocket extends Socket {
@WSGateway({
namespace: "/terminal",
cors: {
origin: process.env.WEB_URL ?? "http://localhost:3000",
origin: (process.env.TRUSTED_ORIGINS ?? process.env.WEB_URL ?? "http://localhost:3000")
.split(",")
.map((s) => s.trim()),
credentials: true,
},
})