Skip to content

Commit

Permalink
fix: bot protection for business.adobe.com
Browse files Browse the repository at this point in the history
  • Loading branch information
alinarublea committed Nov 15, 2024
1 parent 764331c commit e93f6ef
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/support/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,12 @@ URI.preventInvalidHostname = true;

export async function getRUMUrl(url) {
const urlWithScheme = prependSchema(url);
const resp = await fetch(urlWithScheme);
const resp = await fetch(urlWithScheme, {
method: 'GET',
headers: {
'User-Agent': 'curl/7.88.1', // Set the same User-Agent
},
});
const finalUrl = resp.url.split('://')[1];
return finalUrl.endsWith('/') ? finalUrl.slice(0, -1) : /* c8 ignore next */ finalUrl;
}
Expand Down

0 comments on commit e93f6ef

Please sign in to comment.