]> git.openstreetmap.org Git - rails.git/blob - app/controllers/oauth2_authorizations_controller.rb
Merge pull request #4534 from tomhughes/list-headers
[rails.git] / app / controllers / oauth2_authorizations_controller.rb
1 class Oauth2AuthorizationsController < Doorkeeper::AuthorizationsController
2   layout "site"
3
4   prepend_before_action :authorize_web
5   before_action :set_locale
6   before_action :allow_all_form_action, :only => [:new]
7
8   authorize_resource :class => false
9
10   private
11
12   def allow_all_form_action
13     override_content_security_policy_directives(:form_action => []) if Settings.csp_enforce || Settings.key?(:csp_report_url)
14   end
15 end