Skip to content

Commit

Permalink
Update client name and lint fixes (#541)
Browse files Browse the repository at this point in the history
  • Loading branch information
lanedirt committed Feb 10, 2025
1 parent 117da9d commit c2d0355
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
6 changes: 4 additions & 2 deletions browser-extensions/chrome/src/shared/AppInfo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,10 @@ export class AppInfo {
// Minimum supported AliasVault client vault version.
public static readonly MIN_VAULT_VERSION = '1.4.1';

// The client name to use in the X-AliasVault-Client header.
// TODO: make this configurable when adding other browser support (e.g. Firefox).
/*
* The client name to use in the X-AliasVault-Client header.
* TODO: make this configurable when adding other browser support (e.g. Firefox).
*/
public static readonly CLIENT_NAME = 'chrome';

/**
Expand Down
2 changes: 1 addition & 1 deletion src/AliasVault.Client/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
httpClient.BaseAddress = new Uri(baseUrl);

// Add client header.
httpClient.DefaultRequestHeaders.Add("X-AliasVault-Client", "client-" + AppInfo.GetFullVersion());
httpClient.DefaultRequestHeaders.Add("X-AliasVault-Client", "web-" + AppInfo.GetFullVersion());

return httpClient;
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ private async Task VerifySuccessfulLogin()
Assert.Multiple(() =>
{
Assert.That(authLogEntry.Client, Is.Not.Null, "Auth log client header is null.");
Assert.That(authLogEntry.Client, Does.Contain("client-" + currentVersion), "Auth log client header does not contain expected value.");
Assert.That(authLogEntry.Client, Does.Contain("web-" + currentVersion), "Auth log client header does not contain expected value.");
});
}
}

0 comments on commit c2d0355

Please sign in to comment.