@boomerang-io/webapp-spa-server 1.0.2-beta.1 → 1.0.2-beta.2
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/index.js +8 -10
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -60,12 +60,12 @@ function createBoomerangServer({
|
|
|
60
60
|
|
|
61
61
|
// Security
|
|
62
62
|
const helmet = require("helmet");
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
63
|
+
app.use(
|
|
64
|
+
helmet({
|
|
65
|
+
referrerPolicy: { policy: "strict-origin-when-cross-origin" },
|
|
66
|
+
contentSecurityPolicy: false,
|
|
67
|
+
})
|
|
68
|
+
);
|
|
69
69
|
app.disable("x-powered-by");
|
|
70
70
|
app.use(cors(corsConfig));
|
|
71
71
|
|
|
@@ -106,7 +106,6 @@ function createBoomerangServer({
|
|
|
106
106
|
)
|
|
107
107
|
);
|
|
108
108
|
} else {
|
|
109
|
-
logger.debug("1 - disableInjectHTMLHeadData: ", disableInjectHTMLHeadData);
|
|
110
109
|
appRouter.use("/", express.static(path.join(process.cwd(), BUILD_DIR)));
|
|
111
110
|
}
|
|
112
111
|
|
|
@@ -179,12 +178,12 @@ function injectEnvDataAndScriptsIntoHTML(
|
|
|
179
178
|
}
|
|
180
179
|
};
|
|
181
180
|
</script>
|
|
182
|
-
<script src="
|
|
181
|
+
<script src="https://1.www.s81c.com/common/stats/ibm-common.js" type="text/javascript" crossorigin></script>
|
|
183
182
|
`
|
|
184
183
|
: "";
|
|
185
184
|
|
|
186
185
|
const headScriptBeeheardSurvey = Boolean(enableBeeheardSurvey)
|
|
187
|
-
? '<script async src="https://beeheard.dal1a.cirrus.ibm.com/survey/preconfig/HHPxpQgN.js"></script>'
|
|
186
|
+
? '<script async src="https://beeheard.dal1a.cirrus.ibm.com/survey/preconfig/HHPxpQgN.js" crossorigin></script>'
|
|
188
187
|
: "";
|
|
189
188
|
|
|
190
189
|
// Build up object of external data to append
|
|
@@ -217,7 +216,6 @@ function injectEnvDataAndScriptsIntoHTML(
|
|
|
217
216
|
* @param {Buffer} chunk
|
|
218
217
|
* @return {string} replaced string with data interopolated
|
|
219
218
|
*/
|
|
220
|
-
logger.debug("3 - GA script: ", headScripstGA);
|
|
221
219
|
function addHeadData(chunk) {
|
|
222
220
|
return chunk.toString().replace(
|
|
223
221
|
"</head>",
|
package/package.json
CHANGED