mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Merge pull request #961 from YunoHost/add-wss-to-default-src
[enh] Real CSP headers for the webadmin
This commit is contained in:
commit
dbac27cc38
3 changed files with 4 additions and 2 deletions
|
@ -6,6 +6,9 @@ location /yunohost/admin/ {
|
||||||
default_type text/html;
|
default_type text/html;
|
||||||
index index.html;
|
index index.html;
|
||||||
|
|
||||||
|
more_set_headers "Content-Security-Policy: upgrade-insecure-requests; default-src 'self'; connect-src 'self' https://raw.githubusercontent.com https://paste.yunohost.org wss://$host; style-src 'self' 'unsafe-inline'; script-src 'self' 'unsafe-eval'; object-src 'none';";
|
||||||
|
more_set_headers "Content-Security-Policy-Report-Only:";
|
||||||
|
|
||||||
# Short cache on handlebars templates
|
# Short cache on handlebars templates
|
||||||
location ~* \.(?:ms)$ {
|
location ~* \.(?:ms)$ {
|
||||||
expires 5m;
|
expires 5m;
|
||||||
|
|
|
@ -22,7 +22,6 @@ server {
|
||||||
|
|
||||||
more_set_headers "Strict-Transport-Security : max-age=63072000; includeSubDomains; preload";
|
more_set_headers "Strict-Transport-Security : max-age=63072000; includeSubDomains; preload";
|
||||||
more_set_headers "Referrer-Policy : 'same-origin'";
|
more_set_headers "Referrer-Policy : 'same-origin'";
|
||||||
more_set_headers "Content-Security-Policy : upgrade-insecure-requests; object-src 'none'; script-src https: 'unsafe-eval'";
|
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
return 302 https://$http_host/yunohost/admin;
|
return 302 https://$http_host/yunohost/admin;
|
||||||
|
|
Loading…
Add table
Reference in a new issue