@hmcts/rpx-xui-node-lib 2.29.7 → 2.30.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/dist/common/util/contentSecurityPolicy.d.ts +16 -0
- package/dist/common/util/contentSecurityPolicy.d.ts.map +1 -0
- package/dist/common/util/contentSecurityPolicy.js +57 -0
- package/dist/common/util/contentSecurityPolicy.js.map +1 -0
- package/dist/common/util/index.d.ts +1 -0
- package/dist/common/util/index.d.ts.map +1 -1
- package/dist/common/util/index.js +3 -1
- package/dist/common/util/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export declare const SECURITY_POLICY: {
|
|
2
|
+
directives: {
|
|
3
|
+
connectSrc: string[];
|
|
4
|
+
defaultSrc: string[];
|
|
5
|
+
fontSrc: string[];
|
|
6
|
+
formAction: string[];
|
|
7
|
+
frameAncestors: string[];
|
|
8
|
+
frameSrc: string[];
|
|
9
|
+
imgSrc: string[];
|
|
10
|
+
mediaSrc: string[];
|
|
11
|
+
scriptSrc: string[];
|
|
12
|
+
styleSrc: string[];
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
export declare const getContentSecurityPolicy: (helmet: any) => any;
|
|
16
|
+
//# sourceMappingURL=contentSecurityPolicy.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contentSecurityPolicy.d.ts","sourceRoot":"","sources":["../../../src/common/util/contentSecurityPolicy.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,eAAe;;;;;;;;;;;;;CAgD3B,CAAA;AAED,eAAO,MAAM,wBAAwB,WAAY,GAAG,QAEnD,CAAA"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getContentSecurityPolicy = exports.SECURITY_POLICY = void 0;
|
|
4
|
+
exports.SECURITY_POLICY = {
|
|
5
|
+
directives: {
|
|
6
|
+
connectSrc: [
|
|
7
|
+
"'self' blob: data:",
|
|
8
|
+
'*.gov.uk',
|
|
9
|
+
'dc.services.visualstudio.com',
|
|
10
|
+
'*.launchdarkly.com',
|
|
11
|
+
'https://*.google-analytics.com',
|
|
12
|
+
'https://*.googletagmanager.com',
|
|
13
|
+
'https://*.analytics.google.com',
|
|
14
|
+
'*.hmcts.net',
|
|
15
|
+
'wss://*.webpubsub.azure.com',
|
|
16
|
+
'https://*.in.applicationinsights.azure.com',
|
|
17
|
+
'https://*.monitor.azure.com',
|
|
18
|
+
],
|
|
19
|
+
defaultSrc: ["'self'"],
|
|
20
|
+
fontSrc: ["'self'", 'https://fonts.gstatic.com', 'data:'],
|
|
21
|
+
formAction: ["'none'"],
|
|
22
|
+
frameAncestors: ["'self'"],
|
|
23
|
+
frameSrc: ["'self'"],
|
|
24
|
+
imgSrc: [
|
|
25
|
+
"'self'",
|
|
26
|
+
'data:',
|
|
27
|
+
'https://*.google-analytics.com',
|
|
28
|
+
'https://*.googletagmanager.com',
|
|
29
|
+
'https://raw.githubusercontent.com/hmcts/',
|
|
30
|
+
'https://stats.g.doubleclick.net/',
|
|
31
|
+
'https://ssl.gstatic.com/',
|
|
32
|
+
'https://www.gstatic.com/',
|
|
33
|
+
'https://fonts.gstatic.com',
|
|
34
|
+
],
|
|
35
|
+
mediaSrc: ["'self'"],
|
|
36
|
+
scriptSrc: [
|
|
37
|
+
"'self'",
|
|
38
|
+
"'unsafe-inline'",
|
|
39
|
+
"'unsafe-eval'",
|
|
40
|
+
'https://*.google-analytics.com',
|
|
41
|
+
'https://*.googletagmanager.com',
|
|
42
|
+
'az416426.vo.msecnd.net',
|
|
43
|
+
],
|
|
44
|
+
styleSrc: [
|
|
45
|
+
"'self'",
|
|
46
|
+
"'unsafe-inline'",
|
|
47
|
+
'https://fonts.googleapis.com',
|
|
48
|
+
'https://fonts.gstatic.com',
|
|
49
|
+
'https://www.googletagmanager.com',
|
|
50
|
+
],
|
|
51
|
+
},
|
|
52
|
+
};
|
|
53
|
+
const getContentSecurityPolicy = (helmet) => {
|
|
54
|
+
return helmet.contentSecurityPolicy(exports.SECURITY_POLICY);
|
|
55
|
+
};
|
|
56
|
+
exports.getContentSecurityPolicy = getContentSecurityPolicy;
|
|
57
|
+
//# sourceMappingURL=contentSecurityPolicy.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contentSecurityPolicy.js","sourceRoot":"","sources":["../../../src/common/util/contentSecurityPolicy.ts"],"names":[],"mappings":";;;AAAa,QAAA,eAAe,GAAG;IAC3B,UAAU,EAAE;QACR,UAAU,EAAE;YACR,oBAAoB;YACpB,UAAU;YACV,8BAA8B;YAC9B,oBAAoB;YACpB,gCAAgC;YAChC,gCAAgC;YAChC,gCAAgC;YAChC,aAAa;YACb,6BAA6B;YAC7B,4CAA4C;YAC5C,6BAA6B;SAChC;QACD,UAAU,EAAE,CAAC,QAAQ,CAAC;QACtB,OAAO,EAAE,CAAC,QAAQ,EAAE,2BAA2B,EAAE,OAAO,CAAC;QACzD,UAAU,EAAE,CAAC,QAAQ,CAAC;QACtB,cAAc,EAAE,CAAC,QAAQ,CAAC;QAC1B,QAAQ,EAAE,CAAC,QAAQ,CAAC;QACpB,MAAM,EAAE;YACJ,QAAQ;YACR,OAAO;YACP,gCAAgC;YAChC,gCAAgC;YAChC,0CAA0C;YAC1C,kCAAkC;YAClC,0BAA0B;YAC1B,0BAA0B;YAC1B,2BAA2B;SAC9B;QACD,QAAQ,EAAE,CAAC,QAAQ,CAAC;QACpB,SAAS,EAAE;YACP,QAAQ;YACR,iBAAiB;YACjB,eAAe;YACf,gCAAgC;YAChC,gCAAgC;YAChC,wBAAwB;SAC3B;QACD,QAAQ,EAAE;YACN,QAAQ;YACR,iBAAiB;YACjB,8BAA8B;YAC9B,2BAA2B;YAC3B,kCAAkC;SACrC;KACJ;CACJ,CAAA;AAEM,MAAM,wBAAwB,GAAG,CAAC,MAAW,EAAE,EAAE;IACpD,OAAO,MAAM,CAAC,qBAAqB,CAAC,uBAAe,CAAC,CAAA;AACxD,CAAC,CAAA;AAFY,QAAA,wBAAwB,4BAEpC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export { hasKey } from './hasKey';
|
|
2
2
|
export { getLogger, XuiLogger } from './debug.logger';
|
|
3
|
+
export { getContentSecurityPolicy } from './contentSecurityPolicy';
|
|
3
4
|
export { sortArray } from './sortArray';
|
|
4
5
|
export { isStringPatternMatch } from './stringPatternMatch';
|
|
5
6
|
export { arrayPatternMatch } from './arrayPatternMatch';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/common/util/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AACjC,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AACrD,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AACvC,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAA;AAC3D,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAA;AACvD,OAAO,EAAE,qBAAqB,EAAE,uBAAuB,EAAE,MAAM,eAAe,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/common/util/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AACjC,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AACrD,OAAO,EAAE,wBAAwB,EAAE,MAAM,yBAAyB,CAAA;AAClE,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AACvC,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAA;AAC3D,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAA;AACvD,OAAO,EAAE,qBAAqB,EAAE,uBAAuB,EAAE,MAAM,eAAe,CAAA"}
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getUserSessionTimeout = exports.arrayPatternMatch = exports.isStringPatternMatch = exports.sortArray = exports.getLogger = exports.hasKey = void 0;
|
|
3
|
+
exports.getUserSessionTimeout = exports.arrayPatternMatch = exports.isStringPatternMatch = exports.sortArray = exports.getContentSecurityPolicy = exports.getLogger = exports.hasKey = void 0;
|
|
4
4
|
var hasKey_1 = require("./hasKey");
|
|
5
5
|
Object.defineProperty(exports, "hasKey", { enumerable: true, get: function () { return hasKey_1.hasKey; } });
|
|
6
6
|
var debug_logger_1 = require("./debug.logger");
|
|
7
7
|
Object.defineProperty(exports, "getLogger", { enumerable: true, get: function () { return debug_logger_1.getLogger; } });
|
|
8
|
+
var contentSecurityPolicy_1 = require("./contentSecurityPolicy");
|
|
9
|
+
Object.defineProperty(exports, "getContentSecurityPolicy", { enumerable: true, get: function () { return contentSecurityPolicy_1.getContentSecurityPolicy; } });
|
|
8
10
|
var sortArray_1 = require("./sortArray");
|
|
9
11
|
Object.defineProperty(exports, "sortArray", { enumerable: true, get: function () { return sortArray_1.sortArray; } });
|
|
10
12
|
var stringPatternMatch_1 = require("./stringPatternMatch");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/common/util/index.ts"],"names":[],"mappings":";;;AAAA,mCAAiC;AAAxB,gGAAA,MAAM,OAAA;AACf,+CAAqD;AAA5C,yGAAA,SAAS,OAAA;AAClB,yCAAuC;AAA9B,sGAAA,SAAS,OAAA;AAClB,2DAA2D;AAAlD,0HAAA,oBAAoB,OAAA;AAC7B,yDAAuD;AAA9C,sHAAA,iBAAiB,OAAA;AAC1B,6CAA8E;AAArE,oHAAA,qBAAqB,OAAA"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/common/util/index.ts"],"names":[],"mappings":";;;AAAA,mCAAiC;AAAxB,gGAAA,MAAM,OAAA;AACf,+CAAqD;AAA5C,yGAAA,SAAS,OAAA;AAClB,iEAAkE;AAAzD,iIAAA,wBAAwB,OAAA;AACjC,yCAAuC;AAA9B,sGAAA,SAAS,OAAA;AAClB,2DAA2D;AAAlD,0HAAA,oBAAoB,OAAA;AAC7B,yDAAuD;AAA9C,sHAAA,iBAAiB,OAAA;AAC1B,6CAA8E;AAArE,oHAAA,qBAAqB,OAAA"}
|