Tweak nginx portal conf to serve html/css/js/assets from /usr/share/yunohost/portal, similar to webadmin

This commit is contained in:
Alexandre Aubin 2023-07-30 23:53:43 +02:00
parent 5fd1850f19
commit afd7b37ebc

View file

@ -2,6 +2,16 @@
rewrite ^/yunohost/sso$ /yunohost/sso/ permanent;
location /yunohost/sso/ {
alias /usr/share/ssowat/portal/;
alias /usr/share/yunohost/portal/;
default_type text/html;
index index.html;
try_files $uri $uri/ /index.html;
location = /yunohost/sso/index.html {
etag off;
expires off;
more_set_headers "Cache-Control: no-store, no-cache, must-revalidate";
}
more_set_headers "Content-Security-Policy: upgrade-insecure-requests; default-src 'self'; style-src 'self' 'unsafe-inline'; script-src 'self'; object-src 'none'; img-src 'self' data:;";
}