@forge/csp 3.0.1 → 3.1.0-next.0

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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @forge/csp
2
2
 
3
+ ## 3.1.0-next.0
4
+
5
+ ### Minor Changes
6
+
7
+ - fe364c9: Introduce hostname to CSP to allow avatars to be loaded
8
+
3
9
  ## 3.0.1
4
10
 
5
11
  ### Patch Changes
@@ -1 +1 @@
1
- {"version":3,"file":"csp-injection-service.d.ts","sourceRoot":"","sources":["../../src/csp/csp-injection-service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAE3D,OAAO,EAAE,UAAU,EAAmB,MAAM,UAAU,CAAC;AAmBvD,qBAAa,mBAAmB;IAC9B,OAAO,CAAC,eAAe;IAOvB,OAAO,CAAC,iBAAiB;IAIzB,OAAO,CAAC,qBAAqB;IAI7B,OAAO,CAAC,aAAa;IAgBrB,OAAO,CAAC,iBAAiB;IA8BlB,gBAAgB;4BAMD,UAAU;mBACnB,iBAAiB;;;UAG1B,MAAM,EAAE,CAoDV;CACH"}
1
+ {"version":3,"file":"csp-injection-service.d.ts","sourceRoot":"","sources":["../../src/csp/csp-injection-service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAE3D,OAAO,EAAE,UAAU,EAAmB,MAAM,UAAU,CAAC;AAmBvD,qBAAa,mBAAmB;IAC9B,OAAO,CAAC,eAAe;IAOvB,OAAO,CAAC,iBAAiB;IAIzB,OAAO,CAAC,qBAAqB;IAI7B,OAAO,CAAC,aAAa;IAgBrB,OAAO,CAAC,iBAAiB;IA8BlB,gBAAgB;4BAMD,UAAU;mBACnB,iBAAiB;;;UAG1B,MAAM,EAAE,CAwDV;CACH"}
@@ -27,10 +27,13 @@ class CSPInjectionService {
27
27
  "'self'",
28
28
  'data:',
29
29
  'blob:',
30
+ hostname,
30
31
  gravatarUrl,
31
32
  ...atlassianImageHosts[microsEnv],
32
33
  ...this.getExistingCSPDetails(types_1.ExternalCspType.IMG_SRC, existingCSPDetails)
33
- ].join(' ');
34
+ ]
35
+ .filter((a) => a)
36
+ .join(' ');
34
37
  const mediaSrc = [
35
38
  "'self'",
36
39
  'data:',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@forge/csp",
3
- "version": "3.0.1",
3
+ "version": "3.1.0-next.0",
4
4
  "description": "Contains the CSP configuration for Custom UI resources in Forge",
5
5
  "main": "out/index.js",
6
6
  "author": "Atlassian",
@@ -11,8 +11,8 @@
11
11
  "clean": "rm -rf ./out && rm -f tsconfig.tsbuildinfo"
12
12
  },
13
13
  "devDependencies": {
14
- "@forge/cli-shared": "3.20.3",
15
- "@forge/manifest": "5.0.0",
14
+ "@forge/cli-shared": "3.20.4-next.2",
15
+ "@forge/manifest": "5.0.1-next.1",
16
16
  "@types/ignore-walk": "^4.0.2",
17
17
  "@types/jest": "^29.5.6",
18
18
  "@types/node": "14.18.63"