Skip to content

Commit

Permalink
fix(webapp): add missing hashes to CSP
Browse files Browse the repository at this point in the history
Add inline script hashes for `@vitejs/plugin-legacy`:

Add the corresponding hashes to your script-src list:

    sha256-MS6/3FCg4WjP9gwgaBGwLpRCY6fZBgwmhVCdrPrNf3E=
    sha256-tQjf8gvb2ROOMapIxFvFAYBeUJ0v1HCbOcSmDNXGtDo=
    sha256-4y/gEB2/KIwZFTfNqwXJq4olzvmQ0S214m9jwKgNXoc=
    sha256-+5XkZFazzJo8n0iOP4ti/cLCMUudTf//Mzkb7xNPXIc=

Source:
https://github.com/vitejs/vite/tree/main/packages/plugin-legacy#content-security-policy
  • Loading branch information
Rotzbua committed Aug 15, 2023
1 parent fb03802 commit 7a3d82b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion www/conf/sites-available/90-desec.static.location
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ location / {
location /index.html { # Also includes / via internal redirect, see https://nginx.org/en/docs/http/ngx_http_index_module.html#index
expires epoch;
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains; preload" always;
add_header Content-Security-Policy "default-src 'self'; frame-src 'none'; connect-src 'self'; font-src 'self' data:; img-src 'self' data:; media-src data:; script-src 'self' 'unsafe-eval'; style-src 'self' 'unsafe-inline'; base-uri 'self'; frame-ancestors 'none'; block-all-mixed-content; form-action 'none';" always;
add_header Content-Security-Policy "default-src 'self'; frame-src 'none'; connect-src 'self'; font-src 'self' data:; img-src 'self' data:; media-src data:; script-src 'self' 'unsafe-eval' 'sha256-MS6/3FCg4WjP9gwgaBGwLpRCY6fZBgwmhVCdrPrNf3E=' 'sha256-tQjf8gvb2ROOMapIxFvFAYBeUJ0v1HCbOcSmDNXGtDo=' 'sha256-4y/gEB2/KIwZFTfNqwXJq4olzvmQ0S214m9jwKgNXoc=' 'sha256-+5XkZFazzJo8n0iOP4ti/cLCMUudTf//Mzkb7xNPXIc='; style-src 'self' 'unsafe-inline'; base-uri 'self'; frame-ancestors 'none'; block-all-mixed-content; form-action 'none';" always;
add_header X-Frame-Options "deny" always;
add_header X-Content-Type-Options "nosniff" always;
add_header Referrer-Policy "strict-origin-when-cross-origin" always;
Expand Down

0 comments on commit 7a3d82b

Please sign in to comment.