-
-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: nuxt-scripts integration #306
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have no idea why 'to wait for error logs'
is failing. I can't retireve any log.
urls | ||
.map(url => url.toString()) | ||
.includes( | ||
'https://challenges.cloudflare.com/turnstile/v0/api.js?onload=onloadTurnstileCallback', | ||
), | ||
// look for the challenge platform iframe | ||
'https://challenges.cloudflare.com/cdn-cgi/challenge-platform' | ||
) |
Check failure
Code scanning / CodeQL
Incomplete URL substring sanitization High
https://challenges.cloudflare.com/cdn-cgi/challenge-platform
|
||
import { nextTick, useScriptCloudflareTurnstile, useRuntimeConfig, useNuxtApp, ref, onMounted, onBeforeUnmount } from '#imports' | ||
|
||
const props = defineProps({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We want to expose a trigger
option to allow users granular access of when the script loads, see https://github.com/nuxt/scripts/blob/main/src/runtime/components/ScriptGoogleMaps.vue#L44
.map(url => url.toString()) | ||
.includes( | ||
'https://challenges.cloudflare.com/turnstile/v0/api.js?onload=onloadTurnstileCallback', | ||
), | ||
// look for the challenge platform iframe | ||
'https://challenges.cloudflare.com/cdn-cgi/challenge-platform' | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would assume converting these to URL objects would help?
url.map(url=>new URL(url.toString())).some(url=>url.hostname === 'challenges.cloudflare.com' && url.pathname === '/cdn-cgi/challenge-platform')
Hi 馃憢
This PR implements
@nuxt/scripts
fornuxt >= 3.11.1
(we'll see if we remove the compatibility field in@nuxt/scripts
)