lib/secure_headers/headers/x_content_type_options.rb
def validate_config!(config)
        return if config.nil? || config == OPT_OUT
        raise TypeError.new("Must be a string. Found #{config.class}: #{config}") unless config.is_a?(String)
        unless config.casecmp(DEFAULT_VALUE) == 0
          raise XContentTypeOptionsConfigError.new("Value can only be nil or 'nosniff'")
        end
      end
# Public: generate an X-Content-Type-Options header.
#
# Returns a default header if no configuration is provided, or a
# header name and value based on the config.
generate an X-Content-Type-Options header.
Returns a default header if no configuration is provided, or a
header name and value based on the config.
generate an X - Content - Type - Options header . Returns a default header if no configuration is provided or a header name and value based on the config .
def validate_config!(config)
        return if config.nil? || config == OPT_OUT
        raise TypeError.new("Must be a string. Found #{config.class}: #{config}") unless config.is_a?(String)
        unless config.casecmp(DEFAULT_VALUE) == 0
          raise XContentTypeOptionsConfigError.new("Value can only be nil or 'nosniff'")
        end
      end
def validate_config! ( config ) return if config . nil? || config == OPT_OUT raise TypeError . new ( "Must be a string. Found #{config.class}: #{config}" ) unless config . is_a? ( String ) unless config . casecmp ( DEFAULT_VALUE ) == 0 raise XContentTypeOptionsConfigError . new ( "Value can only be nil or 'nosniff'" ) end end
Public: generate an X-Content-Type-Options header.
Public : generate an X - Content - Type - Options header .
config