生成浏览器指纹加上osCpu
This commit is contained in:
parent
1d85406356
commit
2b308dfb27
|
|
@ -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',
|
||||
|
|
|
|||
|
|
@ -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',
|
||||
|
|
|
|||
|
|
@ -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), {
|
||||
|
|
|
|||
Loading…
Reference in New Issue