Skip to content

Privacy-first password manager with built-in email aliasing. Fully encrypted and self-hostable.

Add client header to webapi token refresh call (#618)

Leendert de Borst5750eef24898
diff --git a/browser-extensions/chrome/src/shared/WebApiService.ts b/browser-extensions/chrome/src/shared/WebApiService.ts
index c0af80d88..7a5adb1a6 100644
--- a/browser-extensions/chrome/src/shared/WebApiService.ts
+++ b/browser-extensions/chrome/src/shared/WebApiService.ts
@@ -106,11 +106,13 @@ export class WebApiService {
try {
const baseUrl = await this.getBaseUrl();
+
const response = await fetch(`${baseUrl}Auth/refresh`, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'X-Ignore-Failure': 'true',
+ 'X-AliasVault-Client': `${AppInfo.CLIENT_NAME}-${AppInfo.VERSION}`,
},
body: JSON.stringify({
token: await this.getAccessToken(),
@@ -146,7 +148,7 @@ export class WebApiService {
const response = await this.fetch<Response>(endpoint, {
method: 'GET',
headers: {
- 'Accept': 'application/octet-stream'
+ 'Accept': 'application/octet-stream',
}
}, false);