]> git.openstreetmap.org Git - rails.git/blobdiff - app/controllers/oauth2_authorizations_controller.rb
Simplify margins when showing diary entries
[rails.git] / app / controllers / oauth2_authorizations_controller.rb
index 9c2bce2d1e1cb76a4e87d7b5537933105940e5ca..b851d19b2dd1cd6aea8661bdd8f44d2edd86f8a7 100644 (file)
@@ -5,4 +5,10 @@ class Oauth2AuthorizationsController < Doorkeeper::AuthorizationsController
   before_action :set_locale
 
   authorize_resource :class => false
   before_action :set_locale
 
   authorize_resource :class => false
+
+  def new
+    override_content_security_policy_directives(:form_action => []) if Settings.csp_enforce || Settings.key?(:csp_report_url)
+
+    super
+  end
 end
 end