@contrast/agent 4.36.1 → 4.36.2

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.
@@ -12,6 +12,8 @@ Copyright: 2023 Contrast Security, Inc
12
12
  engineered, modified, repackaged, sold, redistributed or otherwise used in a
13
13
  way not consistent with the End User License Agreement.
14
14
  */
15
+ 'use strict';
16
+
15
17
  const agentEmitter = require('../../../agent-emitter');
16
18
 
17
19
  const RULE_ID = 'xxssprotection-header-disabled';
@@ -23,14 +25,11 @@ module.exports = ({ common }) => {
23
25
  rule.check = function check(responseHeaders) {
24
26
  const header = responseHeaders[HEADER_NAME];
25
27
 
26
- // This header is set by default, so `header` should always be present.
27
- if (header && header.startsWith('1')) {
28
- return;
28
+ if (header && !header.startsWith('1')) {
29
+ return {
30
+ data: header
31
+ };
29
32
  }
30
-
31
- return {
32
- data: header
33
- };
34
33
  };
35
34
 
36
35
  rule.handle = function handle() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contrast/agent",
3
- "version": "4.36.1",
3
+ "version": "4.36.2",
4
4
  "description": "Node.js security instrumentation by Contrast Security",
5
5
  "keywords": [
6
6
  "security",