Ajout de paramètres reverse proxy: possibilité de configurer le CSP et ajout d'une exception modsecurity

This commit is contained in:
Navas 2022-06-12 23:11:33 +02:00
parent 8c1000ae4d
commit 81f60a7b0d
3 changed files with 6 additions and 1 deletions

View file

@ -37,7 +37,7 @@ docker_grav_rp_waf: "On"
| docker_grav_rp_access_policy | | Modèle d'autorisation d'accès du reverse proxy | | docker_grav_rp_access_policy | | Modèle d'autorisation d'accès du reverse proxy |
| docker_grav_rp_indexing | | Stratégie du reverse proxy vis à vis des robots | | docker_grav_rp_indexing | | Stratégie du reverse proxy vis à vis des robots |
| docker_grav_rp_waf | | Activation websecurity du reverse proxy | | docker_grav_rp_waf | | Activation websecurity du reverse proxy |
| | | | | docker_grav_rp_custom_csp | non défini | Si précisé, définit un CSP header avec la valeur indiquée |

View file

@ -3,6 +3,10 @@
ProxyErrorOverride off ProxyErrorOverride off
RequestHeader unset Authorization RequestHeader unset Authorization
{% if docker_grav_rp_custom_csp is defined %}
Header set Content-Security-Policy "{{ docker_grav_rp_custom_csp }}"
{% endif %}
<Location /admin> <Location /admin>
Use LDAPUserAccessPolicy Use LDAPUserAccessPolicy
Require ldap-user {{ docker_grav_ldap_admin_users | join(' ') }} Require ldap-user {{ docker_grav_ldap_admin_users | join(' ') }}

View file

@ -1,6 +1,7 @@
# {{ ansible_managed }} # {{ ansible_managed }}
<LocationMatch "^/admin/"> <LocationMatch "^/admin/">
SecRuleRemoveById 933210 SecRuleRemoveById 933210
SecRuleRemoveById 942100
SecRuleRemoveById 949110 SecRuleRemoveById 949110
</LocationMatch> </LocationMatch>