securenow 5.12.0 → 5.12.1

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.
Files changed (3) hide show
  1. package/cli.js +1 -1
  2. package/firewall.js +4 -3
  3. package/package.json +1 -1
package/cli.js CHANGED
@@ -1,4 +1,4 @@
1
- #!/usr/bin/env node
1
+ #!/usr/bin/env node
2
2
  'use strict';
3
3
 
4
4
  const ui = require('./cli/ui');
package/firewall.js CHANGED
@@ -11,6 +11,7 @@ let _syncTimer = null;
11
11
  let _versionTimer = null;
12
12
  let _lastModified = null;
13
13
  let _lastVersion = null;
14
+ let _lastSyncEtag = null;
14
15
  let _initialized = false;
15
16
  let _consecutiveErrors = 0;
16
17
  let _layers = [];
@@ -40,8 +41,8 @@ function syncBlocklist(callback) {
40
41
  timeout: 10000,
41
42
  };
42
43
 
43
- if (_lastVersion) {
44
- reqOptions.headers['If-None-Match'] = _lastVersion;
44
+ if (_lastSyncEtag) {
45
+ reqOptions.headers['If-None-Match'] = _lastSyncEtag;
45
46
  } else if (_lastModified) {
46
47
  reqOptions.headers['If-Modified-Since'] = _lastModified;
47
48
  }
@@ -65,7 +66,7 @@ function syncBlocklist(callback) {
65
66
  _rawIps = ips;
66
67
  _matcher = createMatcher(ips);
67
68
  _lastModified = res.headers['last-modified'] || null;
68
- if (res.headers['etag']) _lastVersion = res.headers['etag'];
69
+ if (res.headers['etag']) _lastSyncEtag = res.headers['etag'];
69
70
  _stats.syncs++;
70
71
  notifyLayers(ips);
71
72
  callback(null, true, _matcher.stats());
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "securenow",
3
- "version": "5.12.0",
3
+ "version": "5.12.1",
4
4
  "description": "OpenTelemetry instrumentation for Node.js, Next.js, and Nuxt - Send traces and logs to any OTLP-compatible backend",
5
5
  "type": "commonjs",
6
6
  "main": "register.js",