Class: Contrast::Agent::Reporting::ServerSettings
- Inherits:
-
ServerReportingEvent
- Object
- ReportableHash
- ReportingEvent
- ServerReportingEvent
- Contrast::Agent::Reporting::ServerSettings
- Defined in:
- lib/contrast/agent/reporting/reporting_events/server_settings.rb
Overview
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.
Instance Attribute Summary
Attributes inherited from ReportingEvent
#event_endpoint, #event_method
Instance Method Summary collapse
-
#attach_headers(request) ⇒ Object
Attach the last server settings received timestamp to the request as it is required.
- #file_name ⇒ Object
-
#initialize ⇒ ServerSettings
constructor
A new instance of ServerSettings.
- #to_controlled_hash ⇒ Hash
Methods inherited from ReportableHash
#event_json, #valid?, #validate
Methods included from Components::Logger::InstanceMethods
Constructor Details
#initialize ⇒ ServerSettings
Returns a new instance of ServerSettings.
14 15 16 17 18 |
# File 'lib/contrast/agent/reporting/reporting_events/server_settings.rb', line 14 def initialize @event_method = :GET @event_endpoint = Contrast::Agent::Reporting::Endpoints.server_settings super() end |
Instance Method Details
#attach_headers(request) ⇒ Object
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
28 29 30 |
# File 'lib/contrast/agent/reporting/reporting_events/server_settings.rb', line 28 def attach_headers request request['If-Modified-Since'] = since_last_update_httpdate end |
#file_name ⇒ Object
20 21 22 |
# File 'lib/contrast/agent/reporting/reporting_events/server_settings.rb', line 20 def file_name 'server-settings' end |
#to_controlled_hash ⇒ Hash
34 35 36 |
# File 'lib/contrast/agent/reporting/reporting_events/server_settings.rb', line 34 def to_controlled_hash {} end |