mirror of
https://github.com/bitwarden/browser
synced 2025-12-10 13:23:34 +00:00
feat(feature-flags): Add Device-Identifier header to unauthenticated requests
* Added header to unauthenticated requests * Added comment
This commit is contained in:
@@ -1813,6 +1813,11 @@ export class ApiService implements ApiServiceAbstraction {
|
||||
if (authed) {
|
||||
const authHeader = await this.getActiveBearerToken();
|
||||
headers.set("Authorization", "Bearer " + authHeader);
|
||||
} else {
|
||||
// For unauthenticated requests, we need to tell the server what the device is for flag targeting,
|
||||
// since it won't be able to get it from the access token.
|
||||
const appId = await this.appIdService.getAppId();
|
||||
headers.set("Device-Identifier", appId);
|
||||
}
|
||||
|
||||
if (body != null) {
|
||||
|
||||
Reference in New Issue
Block a user