Sha256: fe67997af7c0578dc930441ab66f04f6c6f01a9ee501bc378b68d423ca6336ee
Contents?: true
Size: 891 Bytes
Versions: 9
Compression:
Stored size: 891 Bytes
Contents
module Ixtlan module Core module XXssProtectionHeaders protected def x_xss_protection_headers(mode = nil) case mode || self.class.instance_variable_get(:@_x_xss_protection_headers) || Rails.configuration.x_xss_protection_headers || :block when :disabled response.headers["X-XSS-Protection"] = "0" when :block response.headers["X-XSS-Protection"] = "1; mode=block" when :off else warn "allowed values for x_xss_protection_headers are :nocheck, :block, :off" end end def self.included(base) base.class_eval do def self.x_xss_protection_headers(mode) if(mode) @_x_xss_protection_headers = mode.to_sym else @_x_xss_protection_headers = nil end end end end end end end
Version data entries
9 entries across 9 versions & 1 rubygems