Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove broken CSP headers #534

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 25 additions & 1 deletion roles/demo-apache/templates/apache.conf.j2
Original file line number Diff line number Diff line change
@@ -1,3 +1,28 @@
# Bare IP fallbacks
<VirtualHost *:443>
ServerName default
Redirect 404 /
SSLEngine on
SSLCertificateFile /etc/letsencrypt/live/demo1.sram.surf.nl/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/demo1.sram.surf.nl/privkey.pem
SSLProtocol all -SSLv3 -TLSv1 -TLSv1.1
SSLCipherSuite ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256
SSLHonorCipherOrder on
SSLCompression off
SSLSessionTickets off
</VirtualHost>

<VirtualHost *:80>
ServerName default
Redirect 404 /
</VirtualHost>

# Letsencrypt fallback
<VirtualHost *:80>
ServerName demo1.sram.surf.nl
DocumentRoot /var/www/certbot
</VirtualHost>

{% if letsencrypt_enabled %}
SSLStaplingCache "shmcb:logs/ssl_stapling(32768)"
<VirtualHost *:443>
Expand Down Expand Up @@ -27,7 +52,6 @@ SSLStaplingCache "shmcb:logs/ssl_stapling(32768)"

# This breaks Etherpad and WordPress in horible ways. If anybody has a better idea, shout!
# Header always set Content-Security-Policy "default-src 'self'; base-uri 'self'; frame-src 'none'; form-action 'self' https://*.{{base_domain}}; frame-ancestors 'none'; block-all-mixed-content;"
Header always set Strict-Transport-Security "max-age=31536000; includeSubDomains; preload;"
{% endif %}

# Authentication Header
Expand Down
Loading