Skip to content

Commit 88cbb23

Browse files
authored
fix: Remove Electron and Chrome versions from User-Agent header (#1809)
1 parent 738f65c commit 88cbb23

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

src/navigation/main.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@ const serializeCertificate = (certificate: Certificate): string =>
4040
const queuedTrustRequests = new Map<Certificate['fingerprint'], Array<(isTrusted: boolean) => void>>();
4141

4242
export const setupNavigation = async (): Promise<void> => {
43+
app.userAgentFallback = app.userAgentFallback.replace(`Electron/${ process.versions.electron }`, 'Electron');
44+
app.userAgentFallback = app.userAgentFallback.replace(`Chrome/${ process.versions.chrome }`, 'Chrome');
45+
4346
app.addListener('certificate-error', async (event, _webContents, requestedUrl, error, certificate, callback) => {
4447
event.preventDefault();
4548

0 commit comments

Comments
 (0)