-
Notifications
You must be signed in to change notification settings - Fork 29
Open
Description
If mock_enabled and enabled are both true, then the real cloudflare widget is rendered instead of the mock. By default, enabled is true, so the mock never renders.
In order to see the mock, you need to set mock_enabled to true, and enabled to false, so you end up setting these to the inverse of each other.
This contradicts the behavior described in the README, which says enabled completely disables the widget.
To totally disable Turnstile, you can set
c.enabled = falseand all other config values are ignored.
I believe the root of the issue is here:
| def cloudflare_turnstile_script_tag(async: true, defer: true, explicit: false) | |
| if RailsCloudflareTurnstile.enabled? | |
| content_tag(:script, src: js_src(explicit:), async: async, defer: defer, data: {turbo_track: "reload", turbo_temporary: true}) do | |
| "" | |
| end | |
| elsif RailsCloudflareTurnstile.mock_enabled? | |
| content_tag(:script, src: mock_js, async: async, defer: defer, data: {turbo_track: "reload", turbo_temporary: true}) do | |
| "" | |
| end | |
| end | |
| end |
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels