jpillora / xdomain

A pure JavaScript CORS alternative
https://jpillora.com/xdomain/
3.12k stars 270 forks source link

Does this library still work in 2021? #222

Open taewookim opened 2 years ago

taewookim commented 2 years ago

Safari is blocking all 3rd party cookies.. and Google is following something similar.

Only way i can think of is wrapping JS inside a subdomain via cname.

Ie... serving.com/pixel.js lives on customersite.com

So customer creates "serving.customersite.com" cname, and points it to serving.com

Now "serving.customersite.com/pixel.js" is not considered 3rd party.

Am I correct on this assumption?

jpillora commented 2 years ago

It works but you can’t rely on cookies, you must use a bearer token of some form

On Thu, 16 Sep 2021 at 12:27 am TaeWoo Kim @.***> wrote:

Safari is blocking all 3rd party cookies.. and Google is following something similar.

Only way i can think of is wrapping JS inside a subdomain via cname.

Ie... https://serving.com/pixel.js lives on customersite.com

So customer creates "serving.customersite.com" cname, and points it to serving.com

Now "serving.customersite.com/pixel.js" is not considered 3rd party.

Am I correct on this assumption?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/jpillora/xdomain/issues/222, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAE2X434SXRUJ3PWOJIAIT3UCCUOPANCNFSM5ECSWOEQ .