# File lib/secure_headers.rb, line 34 def ensure_security_headers options = {} self.secure_headers_options = options before_filter :set_hsts_header before_filter :set_x_frame_options_header before_filter :set_csp_header before_filter :set_x_xss_protection_header before_filter :set_x_content_type_options_header before_filter :set_x_download_options_header end
we can't use ||= because I'm overloading false => disable, nil => default both of which trigger the conditional assignment
# File lib/secure_headers.rb, line 46 def options_for(type, options) options.nil? ? ::SecureHeaders::Configuration.send(type) : options end
# File lib/secure_headers.rb, line 24 def secure_headers_options if @secure_headers_options @secure_headers_options elsif superclass.respond_to?(:secure_headers_options) # stop at application_controller superclass.secure_headers_options else {} end end
Generated with the Darkfish Rdoc Generator 2.