]> git.openstreetmap.org Git - rails.git/commitdiff
Allow turnstile for users#create as well as users#new master live
authorTom Hughes <tom@compton.nu>
Sun, 31 May 2026 09:44:36 +0000 (10:44 +0100)
committerTom Hughes <tom@compton.nu>
Sun, 31 May 2026 09:44:36 +0000 (10:44 +0100)
app/controllers/users_controller.rb

index 2c55fcdff04e963b94e9709017c6a5d35ecf17b9..5bb013427506da1a5e6537c2ee41ea90bd907da5 100644 (file)
@@ -20,7 +20,7 @@ class UsersController < ApplicationController
   allow_thirdparty_images :only => :show
   allow_social_login :only => :new
 
   allow_thirdparty_images :only => :show
   allow_social_login :only => :new
 
-  content_security_policy(:only => :new) do |policy|
+  content_security_policy(:only => [:new, :create]) do |policy|
     if Settings.turnstile_site_key
       policy.frame_src(*policy.frame_src, "challenges.cloudflare.com")
       policy.script_src(*policy.script_src, "challenges.cloudflare.com")
     if Settings.turnstile_site_key
       policy.frame_src(*policy.frame_src, "challenges.cloudflare.com")
       policy.script_src(*policy.script_src, "challenges.cloudflare.com")