RegEx support for Safari

This commit is contained in:
FrankRua 2022-04-20 12:02:54 -04:00
parent e34a790d7a
commit c640cea1cb

View file

@ -67,9 +67,9 @@ export function getDeviceIdValue(){
return cookieValuesSplit[1];
}
const cookieValueMatch = cookieValue.match("(?<=did=).*?(?=&)");
const cookieValueMatch = cookieValue.match("^did=[a-f0-9]{8}(?:-[a-f0-9]{4}){3}-[a-f0-9]{12}");
if(cookieValueMatch){
return cookieValueMatch[0];
return cookieValueMatch[0].split('=')[1];
}
return '';