Sha256: fc36bbe1e175c7f4afff52aea373f7e7db4dc4eecdbfee497a3363b36f5f15a0
Contents?: true
Size: 1.38 KB
Versions: 3
Compression:
Stored size: 1.38 KB
Contents
# Copyright (c) 2022 Contrast Security, Inc. See https://www.contrastsecurity.com/enduser-terms-0317a for more details. # frozen_string_literal: true require 'contrast/agent/reporting/reporting_events/server_reporting_event' require 'contrast/agent/reporting/reporting_utilities/endpoints' require 'contrast/utils/timer' module Contrast module Agent module Reporting # This class will initialize a GET request to be send to TS. The server settings endpoint is the way the Agent # receives server sittings - Protect rules settings, patterns, keywords and deny/allow lists, log setting. class ServerSettings < Contrast::Agent::Reporting::ServerReportingEvent def initialize @event_method = :GET @event_endpoint = Contrast::Agent::Reporting::Endpoints.server_settings super end def file_name 'server-settings' end # Attach the last server settings received timestamp to the request as it is required. # # If-Modified-Since: <day-name>, <day> <month> <year> <hour>:<minute>:<second> GMT # @param request [Net::HTTPRequest] def attach_headers request request['If-Modified-Since'] = since_last_update_httpdate end # @return [Hash] # @raise [ArgumentError] def to_controlled_hash {} end end end end end
Version data entries
3 entries across 3 versions & 1 rubygems