Skip to content

Commit 6cd5474

Browse files
dannyshmueliclaude
andcommitted
fix: Always send origin header to server
The origin header was only sent when cliConfig.origin was truthy, but we set it to null when not explicitly provided. This caused the header to never be sent, resulting in "origin: (not set)" in Mixpanel. Fix: Always send the header, using 'null' string when origin is null. This ensures Mixpanel always receives the origin value. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 3eedab7 commit 6cd5474

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/lib/api-client.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -476,9 +476,7 @@ class SecureApiClient {
476476
const configHeaders: Record<string, string> = {};
477477
if (cliConfig) {
478478
configHeaders['x-vibe-config-version'] = cliConfig.version;
479-
if (cliConfig.origin) {
480-
configHeaders['x-vibe-config-origin'] = cliConfig.origin;
481-
}
479+
configHeaders['x-vibe-config-origin'] = cliConfig.origin || 'null';
482480
configHeaders['x-vibe-config-statusline'] = JSON.stringify(cliConfig.statusline);
483481
configHeaders['x-vibe-config-hooks'] = JSON.stringify(cliConfig.hooks);
484482
}

0 commit comments

Comments
 (0)