生成浏览器指纹加上osCpu

This commit is contained in:
wkj 2024-04-30 10:33:39 +08:00
parent 1d85406356
commit 2b308dfb27
3 changed files with 3 additions and 3 deletions

View File

@ -12,7 +12,7 @@ export async function getEnv() {
]);
const { components } = result;
const fields = ['platform', 'timezone', 'vendor', 'vendorFlavors'];
const extendedComponents = pick(components, fields);
const extendedComponents = pick(components, fields.concat('osCpu'));
const visitorId = FingerprintJS.hashComponents(extendedComponents);
const fullEnv = Object.assign(pick(components, fields), {
type: 'web',

View File

@ -16,7 +16,7 @@ async function getEnv() {
]);
const { components } = result;
const fields = ['platform', 'timezone', 'vendor', 'vendorFlavors'];
const extendedComponents = (0, lodash_1.pick)(components, fields);
const extendedComponents = (0, lodash_1.pick)(components, fields.concat('osCpu'));
const visitorId = fingerprintjs_1.default.hashComponents(extendedComponents);
const fullEnv = Object.assign((0, lodash_1.pick)(components, fields), {
type: 'web',

View File

@ -16,7 +16,7 @@ export async function getEnv() {
const { components } = result;
const fields = ['platform', 'timezone', 'vendor', 'vendorFlavors'];
const extendedComponents = pick(components, fields);
const extendedComponents = pick(components, fields.concat('osCpu'));
const visitorId = FingerprintJS.hashComponents(extendedComponents);
const fullEnv = Object.assign(pick(components, fields), {