@andrian.yablonskyy/thub-coordinator 1.0.40 → 1.0.41

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@andrian.yablonskyy/thub-coordinator",
3
- "version": "1.0.40",
3
+ "version": "1.0.41",
4
4
  "description": "TestHub Coordinator — job queue, resource registry, scheduler, heartbeat monitor, log/artifact store and web dashboard",
5
5
  "main": "src/server.js",
6
6
  "engines": {
package/src/security.js CHANGED
@@ -26,7 +26,9 @@ const CDN = 'https://cdn.jsdelivr.net',
26
26
  // data: — Bootstrap's CSS draws some icons (select arrow, close button)
27
27
  // as inline SVG images.
28
28
  'img-src \'self\' data:',
29
- 'connect-src \'self\'',
29
+ // The CDN too: browser DevTools fetch Bootstrap's source maps (*.map)
30
+ // from it — a connection, not a script or style.
31
+ `connect-src 'self' ${CDN}`,
30
32
  'object-src \'none\'',
31
33
  'base-uri \'self\'',
32
34
  'form-action \'self\'',
@@ -52,6 +52,7 @@ test('security headers on pages, the API and static files; HSTS only over HTTPS'
52
52
  assert.match(csp, /default-src 'self'/);
53
53
  assert.match(csp, /script-src 'self' https:\/\/cdn\.jsdelivr\.net(;|$)/); // no 'unsafe-inline' for scripts
54
54
  assert.match(csp, /frame-ancestors 'none'/);
55
+ assert.match(csp, /connect-src 'self' https:\/\/cdn\.jsdelivr\.net(;|$)/); // DevTools: Bootstrap's source maps
55
56
  assert.match(csp, /object-src 'none'/);
56
57
  }
57
58
  // Behind the (loopback, trusted) TLS proxy.