123456789_123456789_123456789_123456789_123456789_

Module: ActionController::ContentSecurityPolicy

Do not use. This module is for internal use only.

Constant Summary

::ActiveSupport::Callbacks - Included

CALLBACK_FILTER_TYPES

::AbstractController::Callbacks - Attributes & Methods

::AbstractController::Helpers - Attributes & Methods

Class Method Summary

::ActiveSupport::DescendantsTracker - self

::ActiveSupport::Concern - Extended

class_methods

Define class methods from given block.

included

Evaluate given block in context of base class, so that you can write class macros here.

prepended

Evaluate given block in context of base class, so that you can write class macros here.

append_features, prepend_features

Instance Attribute Summary

Instance Method Summary

::AbstractController::Callbacks - Included

#process_action

Override AbstractController::Base#process_action to run the process_action callbacks around the normal behavior.

::ActiveSupport::Callbacks - Included

#run_callbacks

Runs the callbacks for the given event.

#halted_callback_hook

A hook invoked every time a before callback is halted.

::AbstractController::Helpers - Included

DSL Calls

included

[ GitHub ]


12
13
14
15
# File 'actionpack/lib/action_controller/metal/content_security_policy.rb', line 12

included do
  helper_method :content_security_policy?
  helper_method :content_security_policy_nonce
end

Class Attribute Details

._helper_methods (rw)

[ GitHub ]

  
# File 'actionpack/lib/abstract_controller/helpers.rb', line 13

class_attribute :_helper_methods, default: Array.new

._helper_methods?Boolean (rw)

[ GitHub ]

  
# File 'actionpack/lib/abstract_controller/helpers.rb', line 13

class_attribute :_helper_methods, default: Array.new

.raise_on_missing_callback_actions (rw) Also known as: #raise_on_missing_callback_actions

[ GitHub ]

  
# File 'actionpack/lib/abstract_controller/callbacks.rb', line 36

mattr_accessor :raise_on_missing_callback_actions, default: false

Instance Attribute Details

#_helper_methods (rw)

[ GitHub ]

  
# File 'actionpack/lib/abstract_controller/helpers.rb', line 13

class_attribute :_helper_methods, default: Array.new

#_helper_methods?Boolean (rw)

[ GitHub ]

  
# File 'actionpack/lib/abstract_controller/helpers.rb', line 13

class_attribute :_helper_methods, default: Array.new

#content_security_policy?Boolean (readonly, private)

[ GitHub ]

  
# File 'actionpack/lib/action_controller/metal/content_security_policy.rb', line 74

def content_security_policy?
  request.content_security_policy
end

#raise_on_missing_callback_actions (rw)

[ GitHub ]

  
# File 'actionpack/lib/abstract_controller/callbacks.rb', line 36

mattr_accessor :raise_on_missing_callback_actions, default: false

Instance Method Details

#content_security_policy_nonce (private)

[ GitHub ]

  
# File 'actionpack/lib/action_controller/metal/content_security_policy.rb', line 78

def content_security_policy_nonce
  request.content_security_policy_nonce
end

#current_content_security_policy (private)

[ GitHub ]

  
# File 'actionpack/lib/action_controller/metal/content_security_policy.rb', line 82

def current_content_security_policy
  request.content_security_policy&.clone || ActionDispatch::ContentSecurityPolicy.new
end