107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
|
# File 'lib/new_relic/agent/new_relic_service.rb', line 107
def preconnect
token = Agent.config[:security_policies_token]
if token && !token.empty?
response = invoke_remote(:preconnect, [{'security_policies_token' => token, 'high_security' => false}])
validator = SecurityPolicySettings::Validator.new(response)
validator.validate_matching_agent_config!
response
elsif Agent.config[:high_security]
invoke_remote(:preconnect, [{'high_security' => true}])
else
invoke_remote(:preconnect, [{'high_security' => false}])
end
end
|