Skip to content

Commit 16c0eda

Browse files
DJBenclaude
andcommitted
fix: increase relay token TTL from 5 minutes to 3 hours
The 5-minute default caused unnecessary reconnect cycles every 5 minutes, disrupting sessions and generating extra relay container traffic. The token is only used for WebSocket authentication on connect, so a longer TTL has no security downside. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 8604779 commit 16c0eda

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

backend/functions/src/config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export function getConfig(): RuntimeConfig {
2222
relayTokenSecret: process.env.RELAY_TOKEN_SECRET || process.env.SESSION_TOKEN_SECRET || "dev-relay-secret",
2323
turnSecret: process.env.TURN_SECRET || "dev-turn-secret",
2424
sessionTtlSeconds: Number(process.env.SESSION_TTL_SECONDS || 3600),
25-
relayTokenTtlSeconds: Number(process.env.RELAY_TOKEN_TTL_SECONDS || 300),
25+
relayTokenTtlSeconds: Number(process.env.RELAY_TOKEN_TTL_SECONDS || 10800),
2626
graceTtlSeconds: Number(process.env.GRACE_TTL_SECONDS || 180)
2727
};
2828
}

0 commit comments

Comments
 (0)