diff --git a/dicos/70_lemonldap_ng.xml b/dicos/70_lemonldap_ng.xml
index bfede2a..797333b 100644
--- a/dicos/70_lemonldap_ng.xml
+++ b/dicos/70_lemonldap_ng.xml
@@ -67,6 +67,7 @@
+
Configuration DNS
@@ -132,5 +133,6 @@
DN de l'utilisateur de connection en lecture à l'annuaire (ex: cn=reader,o=gouv,c=fr)
server_names_hash_bucket_size Taille du hash des noms de serveur pour NGINX
Affiche une case à cocher sur la mire SSO qui permet a l'utilisateur de voir l'historique de connection de son compte avant d'être redirigé vers le service demandé
+ Liste des domaines à ajouter à la directive form-action.
diff --git a/tmpl/handler-nginx.conf b/tmpl/handler-nginx.conf
index a4c4071..726bc86 100644
--- a/tmpl/handler-nginx.conf
+++ b/tmpl/handler-nginx.conf
@@ -39,7 +39,7 @@ server {
error_page 403 404 502 503 504 /nginx.html;
location = /nginx.html{
- root /usr/share/nginx/www;
+ root /usr/share/nginx/html;
}
location = /reload {
diff --git a/tmpl/manager-nginx.conf b/tmpl/manager-nginx.conf
index ec288e5..b1db898 100644
--- a/tmpl/manager-nginx.conf
+++ b/tmpl/manager-nginx.conf
@@ -20,7 +20,7 @@ server {
error_page 403 404 502 503 504 /nginx.html;
location = /nginx.html{
- root /usr/share/nginx/www;
+ root /usr/share/nginx/html;
}
root /usr/share/lemonldap-ng/manager/htdocs/;
diff --git a/tmpl/portal-nginx.conf b/tmpl/portal-nginx.conf
index c753c04..701f484 100644
--- a/tmpl/portal-nginx.conf
+++ b/tmpl/portal-nginx.conf
@@ -5,6 +5,8 @@
# ~/CN=(?[^/]+) $CN;
#}
%set %%webDomain = %%authWebName.split('.',1)[1]
+%set %%CSPTargets = %%custom_join(['http://*.{0} https://*.{0}'.format(d) for d in set([%%webDomain] + %%getVar('llCSPTargets'))], ' ')
+
server {
listen 80;
@@ -42,7 +44,7 @@ server {
fastcgi_split_path_info ^(.*\.psgi)(/.*)$;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_hide_header Content-Security-Policy;
- add_header Content-Security-Policy "default-src 'self'; form-action 'self' http://*.%%webDomain https://*.%%webDomain; object-src 'none'";
+ add_header Content-Security-Policy "default-src 'self'; form-action 'self' %%CSPTargets; object-src 'none'";
}
diff --git a/tmpl/test-nginx.conf b/tmpl/test-nginx.conf
index 87e170f..64e08bd 100644
--- a/tmpl/test-nginx.conf
+++ b/tmpl/test-nginx.conf
@@ -50,6 +50,7 @@ server {
##################################
auth_request /lmauth;
auth_request_set $lmremote_user $upstream_http_lm_remote_user;
+ auth_request_set $lmremote_custom $upstream_http_lm_remote_custom;
auth_request_set $lmlocation $upstream_http_location;
# If CDA is used, uncomment this
#auth_request_set $cookie_value $upstream_http_set_cookie;