Module: SecureHeaders::ClassMethods
- Defined in:
- lib/secure_headers.rb
Instance Attribute Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#secure_headers_options ⇒ Object
97 98 99 100 101 102 103 104 105 |
# File 'lib/secure_headers.rb', line 97 def if @secure_headers_options @secure_headers_options elsif superclass.respond_to?(:secure_headers_options) # stop at application_controller superclass. else {} end end |
Instance Method Details
#ensure_security_headers(options = {}) ⇒ Object
107 108 109 110 111 112 113 114 115 116 |
# File 'lib/secure_headers.rb', line 107 def ensure_security_headers = {} if RUBY_VERSION == "1.8.7" warn "[DEPRECATION] secure_headers ruby 1.8.7 support will dropped in the next release" end self. = hook = respond_to?(:before_action) ? :before_action : :before_filter ALL_FILTER_METHODS.each do |method| send(hook, method) end end |