Skip to content

Commit

Permalink
feat(App): Lock user agents to Windows 10 and macOS 10.15.17 to avoid…
Browse files Browse the repository at this point in the history
… fingerprinting identification
  • Loading branch information
adlk committed Apr 7, 2022
1 parent 4b5d2f7 commit 3b1d495
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions src/helpers/userAgent-helpers.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,12 @@

import os from 'os';
import macosVersion from 'macos-version';
import { isMac, isWindows } from '../environment';

function macOS() {
const version = macosVersion();

return `Macintosh; Intel Mac OS X ${version.replace(/\./g, '_')}`;
// used fixed version (https://bugzilla.mozilla.org/show_bug.cgi?id=1679929)
return 'Macintosh; Intel Mac OS X 10_15_7';
}

function windows() {
const version = os.release();
const [majorVersion, minorVersion] = version.split('.');
return `Windows NT ${majorVersion}.${minorVersion}; Win64; x64`;
return 'Windows NT 10.0; Win64; x64';
}

function linux() {
Expand Down

0 comments on commit 3b1d495

Please sign in to comment.