fix(auth): trim opencode server username

This commit is contained in:
Bohdan Triapitsyn
2026-06-23 21:52:51 +03:00
parent 4feddfa810
commit 2fd86db6a7
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -73,7 +73,7 @@ function generateSecureOpenCodePassword(): string {
}
function buildOpenCodeAuthHeader(password: string): string {
const username = process.env.OPENCODE_SERVER_USERNAME || 'opencode';
const username = process.env.OPENCODE_SERVER_USERNAME?.trim() || 'opencode';
return `Basic ${Buffer.from(`${username}:${password}`, 'utf8').toString('base64')}`;
}