google / eleventy-high-performance-blog

A high performance blog template for the 11ty static site generator.
https://www.industrialempathy.com/posts/eleventy-high-performance-blog/
MIT License
4.01k stars 283 forks source link

AllowDomainlist CORS in ga.js depends on deployment platform #147

Open indcoder opened 2 years ago

indcoder commented 2 years ago

cc @cramforce ,

My issue is very specific to Netlify deployment..

In the ga.js file, the example domain has a trailing slash

image

But unfortunately the origin returned by Netlify is bereft of the trailing slash [I'm not sure of vercel etc]

image

leading to

image

Perhaps in the README and as comments in ga.js we need to draw users attention to it....its a simple but tricky bug; it takes some time to debug...or the equality comparison needs to disregard the trailing slash.

Or the example [industrail empathy needs to be shown without the trailing slash]

cramforce commented 2 years ago

Yeah, the / is wrong. Do you want to send a PR to fix it?

indcoder commented 2 years ago

I will ...along a few more 😀

AC

Sent from mobile

On Sun, 21 Aug, 2022, 22:22 Malte Ubl, @.***> wrote:

Yeah, the / is wrong. Do you want to send a PR to fix it?

— Reply to this email directly, view it on GitHub https://github.com/google/eleventy-high-performance-blog/issues/147#issuecomment-1221582138, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAQAQZAIBZ2ZJRG5PIX7MX3V2JNDFANCNFSM57FHEDBQ . You are receiving this because you authored the thread.Message ID: @.***>