Skip to content

Commit

Permalink
fix: Remove Electron and Chrome versions from User-Agent header (#1809)
Browse files Browse the repository at this point in the history
  • Loading branch information
tassoevan authored Oct 13, 2020
1 parent 738f65c commit 88cbb23
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/navigation/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ const serializeCertificate = (certificate: Certificate): string =>
const queuedTrustRequests = new Map<Certificate['fingerprint'], Array<(isTrusted: boolean) => void>>();

export const setupNavigation = async (): Promise<void> => {
app.userAgentFallback = app.userAgentFallback.replace(`Electron/${ process.versions.electron }`, 'Electron');
app.userAgentFallback = app.userAgentFallback.replace(`Chrome/${ process.versions.chrome }`, 'Chrome');

app.addListener('certificate-error', async (event, _webContents, requestedUrl, error, certificate, callback) => {
event.preventDefault();

Expand Down

0 comments on commit 88cbb23

Please sign in to comment.