Skip to content

Commit 216087e

Browse files
authored
Add default security headers
Adds security headers. They need to be adapted whenever the Cloudflare beacon changes.
1 parent fe79adf commit 216087e

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

build.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
#!/usr/bin/env bash
22

3+
#
4+
# Add versions to frontpage
5+
#
6+
37
function next() {
48
NEXTVERSIONCANDIDATE=$(curl --silent "https://api.github.com/repos/eclipsesource/jsonforms/tags" | grep '"name":' | head -1 | sed -E 's/.*"([^"]+)".*/\1/')
59
if [[ ${NEXTVERSIONCANDIDATE:0:1} == "v" ]] && [[ $NEXTVERSIONCANDIDATE != $CURRENTVERSION ]] ; then NEXTVERSION="${NEXTVERSIONCANDIDATE:1}"; fi

netlify.toml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,13 @@
2828
[[redirects]]
2929
from = "/public/api/vue2/*"
3030
to = "/api/vue2/"
31+
32+
[[headers]]
33+
for = "/*"
34+
[headers.values]
35+
Access-Control-Allow-Origin = "*"
36+
Referrer-Policy = "strict-origin-when-cross-origin"
37+
Content-Security-Policy = "default-src 'self'; script-src 'self' 'unsafe-eval' 'sha256-mC5lwOEBZZZXJoN3sDvzxnxAdNIEKujq9NSXgmhc4HM=' 'sha256-iIf+c/EMxKD/FXoUDy0YsZ3mE+JhzPsmR+aVbrjkdwM=' static.cloudflareinsights.com cloudflareinsights.com/cdn-cgi/rum; connect-src cloudflareinsights.com/cdn-cgi/rum; style-src 'self' 'unsafe-inline'; img-src 'self' data:; object-src 'none'; frame-ancestors 'self';"
38+
X-Frame-Options = "SAMEORIGIN"
39+
X-Content-Type-Options = "nosniff"
40+
Permissions-Policy = "accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=()"

0 commit comments

Comments
 (0)