This commit is contained in:
Eric Bailey
2026-02-18 16:39:55 -06:00
parent d725a01caa
commit 57b9edccb8
+6 -2
View File
@@ -38,8 +38,8 @@ export function accountToSessionMetadata(
* Get anonymous identifiers and construct headers we use for requests that may
* trigger experiment exposures in our backend. These values are used for A/B
* test bucketing, in addition to the user DID, if the request is
* authenticated. They ensure we can attribute exposures to a specific device
* and session, even for unauthenticated requests.
* authenticated. They ensure we can consistently deliver beta features to
* users.
*
* These headers must stay in sync with our appview.
* @see https://github.com/bluesky-social/atproto/blob/39cf199df5847d3fd4a60d8cdeb604a0e07f9784/packages/bsky/src/feature-gates/utils.ts#L7-L8
@@ -48,6 +48,10 @@ export function getAnalyticsHeaders() {
return {
'X-Bsky-Device-Id': getDeviceId(),
'X-Bsky-Session-Id': getSessionId(),
/**
* This can already be inferred from server requests, but for consistency
* in feature bucketing, we also include it here.
*/
'X-Bsky-IP-Geolocation': getIPGeolocationString(),
}
}