summaryrefslogtreecommitdiffstats
path: root/.htaccess
diff options
context:
space:
mode:
authorLukas Reschke <lukas@owncloud.com>2016-01-08 11:19:38 +0100
committerLukas Reschke <lukas@owncloud.com>2016-01-08 11:19:38 +0100
commit48ae3997d46b1f5393a79499a6520cdf7d0881e1 (patch)
tree591b590953f10f6b462a0a6611a8728fc27dac61 /.htaccess
parenta0345b94650f9ded7b86d53b27624557868747e4 (diff)
parent047008e9e39b9481b6a2268af1d8d2922a569174 (diff)
downloadnextcloud-server-48ae3997d46b1f5393a79499a6520cdf7d0881e1.tar.gz
nextcloud-server-48ae3997d46b1f5393a79499a6520cdf7d0881e1.zip
Merge pull request #21220 from owncloud/remove-to-make-apache24-happy
Use setifempty to please incompatible httpd versions
Diffstat (limited to '.htaccess')
-rw-r--r--.htaccess9
1 files changed, 6 insertions, 3 deletions
diff --git a/.htaccess b/.htaccess
index bb030c6acca..b4c7eee9312 100644
--- a/.htaccess
+++ b/.htaccess
@@ -14,9 +14,12 @@
Header set X-Frame-Options "SAMEORIGIN"
SetEnv modHeadersAvailable true
- # Add CSP header if not set, used for static resources
- Header append Content-Security-Policy ""
- Header edit Content-Security-Policy "^$" "default-src 'none'; style-src 'self' 'unsafe-inline'; script-src 'self'"
+ <IfModule mod_version.c>
+ <IfVersion >= 2.4.7>
+ # Add CSP header if not set, used for static resources
+ Header always setifempty Content-Security-Policy "default-src 'none'; style-src 'self' 'unsafe-inline'; script-src 'self'"
+ </IfVersion>
+ </IfModule>
</IfModule>
# Add cache control for CSS and JS files