@abtnode/router-provider 1.16.49-beta-20250828-094758-93e69d1f → 1.16.49-beta-20250828-131156-98768a61

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 (2) hide show
  1. package/lib/nginx/index.js +8 -10
  2. package/package.json +7 -7
@@ -26,6 +26,10 @@ const {
26
26
  GATEWAY_RATE_LIMIT_GLOBAL,
27
27
  GATEWAY_RATE_LIMIT,
28
28
  DOMAIN_FOR_IP_SITE_REGEXP,
29
+ CSP_OFFICIAL_SOURCES,
30
+ CSP_SYSTEM_SOURCES,
31
+ CSP_THIRD_PARTY_SOURCES,
32
+ CSP_ICONIFY_SOURCES,
29
33
  } = require('@abtnode/constant');
30
34
  const { toHex } = require('@ocap/util');
31
35
  const promiseRetry = require('promise-retry');
@@ -892,20 +896,14 @@ class NginxProvider extends BaseProvider {
892
896
  _ensureDaemonSecurityHeaders() {
893
897
  const securityFilePath = path.join(this.includesDir, 'daemon', 'security');
894
898
  const cspSources = [
895
- 'https://*.blocklet.dev',
896
- 'wss://*.blocklet.dev',
897
- 'https://didnames.io',
898
- 'https://*.did.abtnet.io',
899
- 'wss://*.did.abtnet.io',
900
- 'https://*.ip.abtnet.io',
901
- 'wss://*.ip.abtnet.io',
899
+ ...CSP_OFFICIAL_SOURCES,
900
+ ...CSP_SYSTEM_SOURCES,
901
+ ...CSP_THIRD_PARTY_SOURCES,
902
+ ...CSP_ICONIFY_SOURCES,
902
903
  'data:',
903
904
  'blob:',
904
905
  '*/__blocklet__.js',
905
906
  '*/.well-known/ping',
906
- 'https://api.simplesvg.com',
907
- 'https://api.unisvg.com',
908
- 'https://api.iconify.design',
909
907
  ];
910
908
  const cspPolicy = `default-src 'self'; frame-ancestors 'none'; script-src 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline'; img-src 'self' ${cspSources.join(' ')}; font-src 'self' data:; connect-src 'self' ${cspSources.join(' ')} */.well-known/ping; base-uri 'self'; object-src 'none'`;
911
909
  const cspLine = `add_header Content-Security-Policy "${cspPolicy}" always;`;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abtnode/router-provider",
3
- "version": "1.16.49-beta-20250828-094758-93e69d1f",
3
+ "version": "1.16.49-beta-20250828-131156-98768a61",
4
4
  "description": "Routing engine implementations for abt node",
5
5
  "author": "polunzh <polunzh@gmail.com>",
6
6
  "homepage": "https://github.com/ArcBlock/blocklet-server#readme",
@@ -32,11 +32,11 @@
32
32
  "url": "https://github.com/ArcBlock/blocklet-server/issues"
33
33
  },
34
34
  "dependencies": {
35
- "@abtnode/constant": "1.16.49-beta-20250828-094758-93e69d1f",
36
- "@abtnode/db-cache": "1.16.49-beta-20250828-094758-93e69d1f",
37
- "@abtnode/logger": "1.16.49-beta-20250828-094758-93e69d1f",
38
- "@abtnode/router-templates": "1.16.49-beta-20250828-094758-93e69d1f",
39
- "@abtnode/util": "1.16.49-beta-20250828-094758-93e69d1f",
35
+ "@abtnode/constant": "1.16.49-beta-20250828-131156-98768a61",
36
+ "@abtnode/db-cache": "1.16.49-beta-20250828-131156-98768a61",
37
+ "@abtnode/logger": "1.16.49-beta-20250828-131156-98768a61",
38
+ "@abtnode/router-templates": "1.16.49-beta-20250828-131156-98768a61",
39
+ "@abtnode/util": "1.16.49-beta-20250828-131156-98768a61",
40
40
  "@arcblock/http-proxy": "^1.19.1",
41
41
  "@arcblock/is-valid-domain": "^1.0.5",
42
42
  "@ocap/util": "^1.23.1",
@@ -62,5 +62,5 @@
62
62
  "bluebird": "^3.7.2",
63
63
  "fs-extra": "^11.2.0"
64
64
  },
65
- "gitHead": "587711a6df767cafaadbb503daeac586e22c3988"
65
+ "gitHead": "2d2312333cf9dd50034609c678f2fd777e0ba25a"
66
66
  }