feat: refine codex live chat context flows
This commit is contained in:
@@ -54,6 +54,18 @@ export function appendClientIdHeader(headersInit?: HeadersInit) {
|
||||
headers.set('X-Client-Id', clientId);
|
||||
}
|
||||
|
||||
if (typeof window !== 'undefined') {
|
||||
const { origin, hostname } = window.location;
|
||||
|
||||
if (origin && !headers.has('X-App-Origin')) {
|
||||
headers.set('X-App-Origin', origin);
|
||||
}
|
||||
|
||||
if (hostname && !headers.has('X-App-Domain')) {
|
||||
headers.set('X-App-Domain', hostname);
|
||||
}
|
||||
}
|
||||
|
||||
return headers;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user