@botfabrik/engine-webclient 4.109.12-alpha.1 → 4.109.12-alpha.3
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/index.js +15 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -55,7 +55,10 @@ export default (clientName, environment, props) => async (bot) => {
|
|
|
55
55
|
directives: {
|
|
56
56
|
defaultSrc: ["'self'"],
|
|
57
57
|
scriptSrc: ["'self'"],
|
|
58
|
-
|
|
58
|
+
// stylesheets from trusted resource origins are allowed (e.g. Google Fonts CSS)
|
|
59
|
+
styleSrc: trustedResourceOrigins === undefined
|
|
60
|
+
? ["'self'", "'unsafe-inline'"]
|
|
61
|
+
: ["'self'", "'unsafe-inline'", ...trustedResourceOrigins],
|
|
59
62
|
// images: restrict to trusted resource origins when defined, otherwise allow all HTTPS
|
|
60
63
|
imgSrc: trustedResourceOrigins === undefined
|
|
61
64
|
? ["'self'", 'data:', 'https:']
|
|
@@ -75,6 +78,17 @@ export default (clientName, environment, props) => async (bot) => {
|
|
|
75
78
|
frameAncestors: allowedOrigins === undefined
|
|
76
79
|
? ['*']
|
|
77
80
|
: ["'self'", ...allowedOrigins],
|
|
81
|
+
// frame-src controls what this page may embed in an iframe.
|
|
82
|
+
// The /embed page loads the chatbot in an iframe on the same server.
|
|
83
|
+
// We include both http and https of the server's base URL because a browser
|
|
84
|
+
// with a cached HSTS policy for localhost may load the iframe via https://
|
|
85
|
+
// even when the embed page was served via http://.
|
|
86
|
+
frameSrc: [
|
|
87
|
+
"'self'",
|
|
88
|
+
bot.webserver.baseUrl,
|
|
89
|
+
bot.webserver.baseUrl.replace(/^http:/, 'https:'),
|
|
90
|
+
...(allowedOrigins ?? []),
|
|
91
|
+
],
|
|
78
92
|
objectSrc: ["'none'"], // disable Flash/plugins
|
|
79
93
|
baseUri: ["'self'"], // prevent <base>-tag injection
|
|
80
94
|
// When SAML auth is configured, the browser POSTs a form to the external IdP.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@botfabrik/engine-webclient",
|
|
3
|
-
"version": "4.109.12-alpha.
|
|
3
|
+
"version": "4.109.12-alpha.3",
|
|
4
4
|
"description": "Webclient for Botfabriks Bot Engine",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -53,5 +53,5 @@
|
|
|
53
53
|
"tsx": "^4.21.0",
|
|
54
54
|
"typescript": "5.9.3"
|
|
55
55
|
},
|
|
56
|
-
"gitHead": "
|
|
56
|
+
"gitHead": "5b7e98b937eff8de52f6f10e180b49868b949860"
|
|
57
57
|
}
|