mirror of
https://github.com/labring/FastGPT.git
synced 2025-07-23 13:03:50 +00:00

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>
14 lines
331 B
TypeScript
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:';
|
|
};
|