SpaceApper/scripts/listeners.mjs

12 lines
351 B
JavaScript
Raw Normal View History

2024-07-28 23:22:45 +02:00
export { changeUserAgent };
function changeUserAgent(details) {
for (const header of details.requestHeaders) {
if (header.name.toLowerCase() === "user-agent") {
header.value = "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/115.0";
break;
}
}
return { requestHeaders: details.requestHeaders };
}