Files
FastGPT/packages/web/common/system/utils.ts
Archer 1fbc407ecf 4.7.1-alpha2 (#1153)
Co-authored-by: UUUUnotfound <31206589+UUUUnotfound@users.noreply.github.com>
Co-authored-by: Hexiao Zhang <731931282qq@gmail.com>
Co-authored-by: heheer <71265218+newfish-cmyk@users.noreply.github.com>
2024-04-08 21:17:33 +08:00

14 lines
331 B
TypeScript

import FingerprintJS from '@fingerprintjs/fingerprintjs';
const fpPromise = FingerprintJS.load();
export const getUserFingerprint = async () => {
const fp = await fpPromise;
const result = await fp.get();
console.log(result.visitorId);
};
export const hasHttps = () => {
return window.location.protocol === 'https:';
};