mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2024-12-25 03:25:03 +01:00
Changed content security policy for matomo tracking
This commit is contained in:
parent
9b82435a6d
commit
dc11daf43d
@ -1,5 +1,8 @@
|
||||
# Add CSP header
|
||||
more_set_headers "Content-Security-Policy: default-src 'self'; img-src 'self' https://matomo.{{top_domain}}; script-src 'self' 'unsafe-inline' https://matomo.{{top_domain}};";
|
||||
|
||||
|
||||
# sub filters to integrate matomo tracking code in nginx websites
|
||||
sub_filter '</head>' '<script>{{matomo_tracking_code_one_liner}}</script></head>';
|
||||
sub_filter '</body>' '<noscript><p><img src="//matomo.veen.world/matomo.php?idsite={{matomo_site_id}}&rec=1" style="border:0;" alt="" /></p></noscript></body>';
|
||||
sub_filter_once off;
|
||||
# sub_filter_types text/html; This is standart
|
||||
sub_filter '</body>' '<noscript><p><img src="//matomo.{{top_domain}}/matomo.php?idsite={{matomo_site_id}}&rec=1" style="border:0;" alt="" /></p></noscript></body>';
|
||||
sub_filter_once off;
|
@ -1,3 +1,4 @@
|
||||
load_module /usr/lib/nginx/modules/ngx_http_headers_more_filter_module.so;
|
||||
worker_processes auto;
|
||||
|
||||
events
|
||||
|
Loading…
Reference in New Issue
Block a user