Skip to content
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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: duplicate script injection when navigating to different page #31

Merged
merged 1 commit into from
Jul 16, 2024

Conversation

yuskhan
Copy link
Contributor

@yuskhan yuskhan commented Jul 3, 2024

Resolves #29

Solution:
If the script is already injected, onloadTurnstileCallback is called manually to render a new turnstile widget.

Copy link

cloudflare-workers-and-pages bot commented Jul 4, 2024

Deploying ngx-turnstile with  Cloudflare Pages  Cloudflare Pages

Latest commit: e4e1dc0
Status: ✅  Deploy successful!
Preview URL: https://19600d47.ngx-turnstile.pages.dev
Branch Preview URL: https://dup-script-fix.ngx-turnstile.pages.dev

View logs

Copy link
Member

@choyiny choyiny left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@choyiny choyiny requested a review from AleksanderBodurri July 9, 2024 03:35
Copy link

@orca-security-us orca-security-us bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Orca Security Scan Summary

Status Check Issues by priority
Passed Passed Infrastructure as Code high 0   medium 0   low 0   info 0 View in Orca
Passed Passed Secrets high 0   medium 0   low 0   info 0 View in Orca
Passed Passed Vulnerabilities high 0   medium 0   low 0   info 0 View in Orca

chore: add test for duplicate script injection fix

fix: inject Document

chore: format
@AleksanderBodurri AleksanderBodurri merged commit 5174532 into main Jul 16, 2024
10 checks passed
@AleksanderBodurri AleksanderBodurri deleted the dup-script-fix branch July 16, 2024 15:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Duplicate Script Injection in Head Tag When Using ngx-turnstile Component
3 participants