lib/secure_headers/utils/cookies_config.rb
# validate exclusivity of only and except members within strict and lax
validate exclusivity of only and except members within strict and lax
validate exclusivity of only and except members within strict and lax
def validate_exclusive_use_of_samesite_enforcement!(attribute)
      if (intersection = (config[:samesite][:lax].fetch(attribute, []) & config[:samesite][:strict].fetch(attribute, []))).any?
        raise CookiesConfigError.new("samesite cookie config is invalid, cookie(s) #{intersection.join(', ')} cannot be enforced as lax and strict")
      end
    end
def validate_exclusive_use_of_samesite_enforcement! ( attribute ) if ( intersection = ( config [ :samesite ] [ :lax ] . fetch ( attribute , [ ] ) & config [ :samesite ] [ :strict ] . fetch ( attribute , [ ] ) ) ) . any? raise CookiesConfigError . new ( "samesite cookie config is invalid, cookie(s) #{intersection.join(', ')} cannot be enforced as lax and strict" ) end end
validate exclusivity of only and except members within strict and lax
validate exclusivity of only and except members within strict and lax
attribute