ClydeDz / meta-tag-analyzer

An Azure DevOps task that generates a report after analysing the meta tags of each page on your website.
http://bit.ly/metataganalyzer
MIT License
0 stars 0 forks source link

Need support for Blazor WebAssembly (SPA) + Prerender + Cloudflare #12

Open getthit opened 2 years ago

getthit commented 2 years ago

Greeting,

We are unable to run the Meta Tag Analyzer for Single page applications, Need support for Blazor WebAssembly + Prerender + Cloudflare Firewall.

Browser user agent is sent as empty and it is blocked by firewall. Please provide support to send user-agent as bot.

Eg: Mozilla/5.0 (compatible; Meta Tag Analyzer bot; +https://github.com/ClydeDz/meta-tag-analyzer/)

image

ClydeDz commented 2 years ago

Hi!

Thanks for surfacing an issue. I was able to reproduce this locally. Unfortunately, updating this line to const currentURLXHRResult: WebRequest.Response<string> = await WebRequest.get(url, {headers: {'user-agent': 'Mozilla/5.0 (compatible; Meta Tag Analyzer bot; +https://github.com/ClydeDz/meta-tag-analyzer/)'}}); didn't work either.

Happy to hear more ideas! If any solution works for you, feel free to create a PR for it.

Thanks.