mirror of
https://github.com/bitwarden/browser
synced 2025-12-06 00:13:28 +00:00
[PM-28446] Log package types (#17496)
* User agent * Update to use header * Fix build on cli * Replace unsandboxed with unknown * Apply feedback * Prevent sending null values
This commit is contained in:
@@ -55,4 +55,5 @@ export abstract class PlatformUtilsService {
|
||||
abstract readFromClipboard(): Promise<string>;
|
||||
abstract supportsSecureStorage(): boolean;
|
||||
abstract getAutofillKeyboardShortcut(): Promise<string>;
|
||||
abstract packageType(): Promise<string | null>;
|
||||
}
|
||||
|
||||
@@ -1325,6 +1325,11 @@ export class ApiService implements ApiServiceAbstraction {
|
||||
"Bitwarden-Client-Version",
|
||||
await this.platformUtilsService.getApplicationVersionNumber(),
|
||||
);
|
||||
|
||||
const packageType = await this.platformUtilsService.packageType();
|
||||
if (packageType != null) {
|
||||
request.headers.set("Bitwarden-Package-Type", packageType);
|
||||
}
|
||||
return this.nativeFetch(request);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user