astro-analytics icon indicating copy to clipboard operation
astro-analytics copied to clipboard

This script link along with others need CORS attributes

Open aFuzzyBear opened this issue 3 years ago • 2 comments
trafficstars

https://github.com/Destiner/astro-analytics/blob/86756864acf378de9e0062ffebbf51006e85ca1f/src/Fathom.astro#L8

Hey its me again, I just wanted to say if you add the crossorigin="use-credentials || anonymous" to the script tags it would allow that to pass through without having any CORS issues, else they would end up running away with you,

aFuzzyBear avatar Dec 06 '21 13:12 aFuzzyBear

@aFuzzyBear thanks for suggestion. Do you mind to clarify? I don't have a lot of knowledge with crossorigin, but adding it makes the script failing to load, at least on localhost.

Destiner avatar Dec 07 '21 09:12 Destiner

Hi @Destiner,

The CORS issue is more of a explicit way of telling the browser what to send with that request, if the request was made from the same origin as the request is coming from or if it was made my an external third party script.

This is a pitfall of problems, I havent looked into which cors tag that you need to apply for each of these scripts that you have, but I would recommend checking it out,

aFuzzyBear avatar Dec 07 '21 12:12 aFuzzyBear