Sha256: 32bd4ddc78015866290bbf2f836263a590e8c4a4f9f1dd7a92f5dfae6b315d2e
Contents?: true
Size: 1.38 KB
Versions: 18
Compression:
Stored size: 1.38 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/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
18 entries across 18 versions & 1 rubygems