@newrelic/security-agent 0.0.2 → 0.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -140,8 +140,6 @@ function initialize() {
140
140
  // Initialize Agent Status
141
141
  const status = agentStatus.getInstance();
142
142
 
143
- // Initialize Collector config
144
-
145
143
  // Initialize
146
144
  Agent.init(applicationInfo, logger, wsClient, status);
147
145
  initLogger.info(LOG_MESSAGES.AGENT_INIT_SUCCESSFUL, applicationInfo.pid, applicationInfo.applicationUUID);
@@ -11,7 +11,7 @@ const { Agent } = require('../../../agent');
11
11
  const { FuzzFailEvent } = require('../../../FuzzFailEvent');
12
12
  const { hasWorker: isWorkerSupported } = require('../../../commonUtils');
13
13
  const { CSEC_HOME_TMP, COLON, NR_CSEC_FUZZ_REQUEST_ID } = require('../../../sec-agent-constants');
14
- const LOCALHOST = '127.0.0.1';
14
+ const LOCALHOST = 'localhost';
15
15
  const COLON_SLASH_SLASH = '://';
16
16
  const http = require('http');
17
17
  const https = require('https');
@@ -121,9 +121,10 @@ function handleFuzzResponse (request, fuzzDetails) {
121
121
  * @param {JSON} requestObject
122
122
  */
123
123
  function parseAxiosHttpRequestToFuzz (requestObject) {
124
- const serverName = requestObject.serverName ? requestObject.serverName : LOCALHOST;
124
+ let serverName = requestObject.serverName ? requestObject.serverName : LOCALHOST;
125
+ let host = serverName + COLON + requestObject.serverPort
125
126
  return {
126
- url: requestObject.protocol + COLON_SLASH_SLASH + serverName + COLON + requestObject.serverPort + requestObject.url,
127
+ url: requestObject.protocol + COLON_SLASH_SLASH + host + requestObject.url,
127
128
  method: requestObject.method,
128
129
  data: requestObject.body,
129
130
  headers: requestObject.headers,
@@ -4,7 +4,7 @@
4
4
  */
5
5
 
6
6
  let newrelic;
7
- let NRAgent;
7
+ let NRAgent;
8
8
 
9
9
  /**
10
10
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@newrelic/security-agent",
3
- "version": "0.0.2",
3
+ "version": "0.0.4",
4
4
  "description": "Newrelic Security Agent for Node.js",
5
5
  "main": "index.js",
6
6
  "collectorVersion": "1.0.1-limited-preview",