Sha256: b7c9391d8160f9307f90a539df85e230b1c506bd5b22d3da0821f645e216b028
Contents?: true
Size: 1.33 KB
Versions: 18
Compression:
Stored size: 1.33 KB
Contents
# Copyright (c) 2023 Contrast Security, Inc. See https://www.contrastsecurity.com/enduser-terms-0317a for more details. # frozen_string_literal: true require 'contrast/components/base' module Contrast module Config # Common Configuration settings. Those in this section pertain to the exception handling in Ruby, allowing for the # override of Response Code and Message when Security Exceptions are raised. class ExceptionConfiguration include Contrast::Config::BaseConfiguration include Contrast::Components::ComponentBase CANON_NAME = 'agent.ruby.exception' CONFIG_VALUES = %w[capture override_status override_message].cs__freeze # @return [Integer] the HTTP status code override attr_accessor :override_status # @return [String] the message text override attr_accessor :override_message attr_writer :capture # @return [String] attr_reader :canon_name # @return [Array] attr_reader :config_values def initialize hsh = {} @config_values = CONFIG_VALUES @canon_name = CANON_NAME return unless hsh @capture = hsh[:capture] @override_status = hsh[:override_status] @override_message = hsh[:override_message] end # @return [Boolean, false] def capture !!@capture end end end end
Version data entries
18 entries across 18 versions & 1 rubygems