3rd party script blocked by CORS #193
Unanswered
AloisSeckar
asked this question in
Q&A
Replies: 1 comment 2 replies
-
Hi @AloisSeckar This is due to You can get around this issue by doing scripts: {
globals: {
myScript: ['https://app.termly.io/resource-blocker/bbc9f62b-96e1-4064-bea5-e604bb669e55?autoBlock=on', {
trigger: 'onNuxtReady',
crossorigin: false,
}],
},
}, You can read more about this behaviour here: https://unhead.unjs.io/usage/composables/use-script#referrerpolicy-and-crossorigin Let me know if you have any questions or feedback around this 🙂 |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I am trying to call external script of Termly cookie consent service via Nuxt Scripts.
This is what I have in my
nuxt.config.ts
:However, the call gets blocked due to CORS:

When I have script referenced from
useHead
, it worked with no issues:I am still getting confused with CORS stuff in general. Is there some setting, I need to set up for Nuxt Script module or for Nuxt in general to get this working? Or is it because the target domain refuses my requests due to something I cannot quite affect?
Beta Was this translation helpful? Give feedback.
All reactions