Skip to content

Commit c3aaf16

Browse files
author
Till Brehm
committed
Merge branch 'security_headers' into 'stable-3.1'
vary CSP header for HTTP and HTTPS, and secure cookies See merge request ispconfig/ispconfig3!1042
2 parents ee926b7 + baff94e commit c3aaf16

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

install/tpl/apache_ispconfig.vhost.master

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,11 +89,13 @@ NameVirtualHost *:<tmpl_var name="vhost_port">
8989

9090
<IfModule mod_headers.c>
9191
# ISPConfig 3.1 currently requires unsafe-line for both scripts and styles, as well as unsafe-eval
92+
Header set Content-Security-Policy "default-src 'self' 'unsafe-inline' 'unsafe-eval'; img-src 'self' data:; object-src 'none'"
9293
<tmpl_var name="ssl_comment">Header set Content-Security-Policy "default-src 'self' 'unsafe-inline' 'unsafe-eval'; img-src 'self' data:; object-src 'none'; upgrade-insecure-requests"
9394
Header set X-Content-Type-Options: nosniff
9495
Header set X-Frame-Options: SAMEORIGIN
9596
Header set X-XSS-Protection: "1; mode=block"
96-
<tmpl_var name="ssl_comment">Header always edit Set-Cookie (.*) "$1; HTTPOnly; Secure"
97+
Header always edit Set-Cookie (.*) "$1; HTTPOnly"
98+
<tmpl_var name="ssl_comment">Header always edit Set-Cookie (.*) "$1; Secure"
9799
<IfVersion >= 2.4.7>
98100
Header setifempty Strict-Transport-Security "max-age=15768000"
99101
</IfVersion>

0 commit comments

Comments
 (0)