Skip to content

Commit 9a24fc8

Browse files
authored
chore(examples): add security headers to dashboard app example (#6953)
1 parent 4829f2a commit 9a24fc8

File tree

3 files changed

+21
-6
lines changed

3 files changed

+21
-6
lines changed

examples/react-dashboard/dashboard-app/.netlify/state.json

Lines changed: 0 additions & 3 deletions
This file was deleted.

examples/react-dashboard/dashboard-app/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,9 +87,9 @@
8787
"workbox-webpack-plugin": "4.2.0"
8888
},
8989
"scripts": {
90-
"start": "node scripts/start.js",
91-
"build": "node scripts/build.js",
92-
"test": "node scripts/test.js",
90+
"start": "export SET NODE_OPTIONS=--openssl-legacy-provider && node scripts/start.js",
91+
"build": "export SET NODE_OPTIONS=--openssl-legacy-provider && node scripts/build.js",
92+
"test": "export SET NODE_OPTIONS=--openssl-legacy-provider && node scripts/test.js",
9393
"preview": "netlify deploy --dir build",
9494
"deploy": "netlify deploy --prod --dir build"
9595
},
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"headers": [
3+
{
4+
"source": "/(.*)",
5+
"headers": [
6+
{
7+
"key": "Strict-Transport-Security",
8+
"value": "max-age=31536000; includeSubDomains;"
9+
},
10+
{
11+
"key": "Content-Security-Policy",
12+
"value": "default-src 'self'; script-src 'report-sample' 'self' https://www.datadoghq-browser-agent.com/datadog-logs-v4.js 'unsafe-inline'; style-src 'report-sample' 'self' https://fonts.googleapis.com 'unsafe-inline'; object-src 'none'; base-uri 'self'; connect-src 'self' https://graphql.contentful.com https://harsh-eel.aws-us-east-2.cubecloudapp.dev https://track.cube.dev https://identity.cube.dev https://logs.browser-intake-datadoghq.com; font-src 'self' https://fonts.gstatic.com https://static.cube.dev; frame-src 'self'; img-src 'self' data: https://static.cube.dev; manifest-src 'self'; media-src 'self'; worker-src 'none';"
13+
}
14+
]
15+
}
16+
]
17+
}
18+

0 commit comments

Comments
 (0)