mirror of
https://github.com/standardebooks/web.git
synced 2025-07-06 06:40:33 -04:00
Add CSP policy in Apache config, and explicitly disable caching of PHP fiels
This commit is contained in:
parent
a32711acc3
commit
d649df75f0
2 changed files with 6 additions and 18 deletions
|
@ -66,14 +66,7 @@ Define domain standardebooks.org
|
|||
SSLCertificateFile /etc/letsencrypt/live/${domain}/fullchain.pem
|
||||
SSLCertificateKeyFile /etc/letsencrypt/live/${domain}/privkey.pem
|
||||
Header always set Strict-Transport-Security "max-age=15768000"
|
||||
|
||||
# CSP still causes a lot of problems with Firefox (can't use inline CSS debugger, etc.) so disable for now.
|
||||
# Header set Content-Security-Policy "default-src 'self';"
|
||||
|
||||
# # Below is required to fix a Firefox bug with CSP and SVG images; see https://pokeinthe.io/2016/04/09/black-icons-with-svg-and-csp/
|
||||
# <FilesMatch "\.svg$">
|
||||
# Header set Content-Security-Policy "default-src 'none'; frame-ancestors 'none'; style-src 'self' 'unsafe-inline';"
|
||||
# </FilesMatch>
|
||||
Header set Content-Security-Policy "default-src 'self';"
|
||||
|
||||
# Log downloads
|
||||
SetEnvIf Request_URI "\.epub$" logdownload
|
||||
|
@ -132,7 +125,8 @@ Define domain standardebooks.org
|
|||
|
||||
# Forward all PHP requests to the php-fpm pool for this domain.
|
||||
<FilesMatch \.php$>
|
||||
SetHandler "proxy:unix:/run/php/${domain}.sock|fcgi://${domain}"
|
||||
SetHandler "proxy:unix:/run/php/${domain}.sock|fcgi://${domain}"
|
||||
Header set Cache-Control "no-store"
|
||||
</FilesMatch>
|
||||
|
||||
# Set some proxy properties.
|
||||
|
|
|
@ -65,14 +65,7 @@ Define domain standardebooks.test
|
|||
SSLCertificateFile /standardebooks.org/web/config/ssl/${domain}.crt
|
||||
SSLCertificateKeyFile /standardebooks.org/web/config/ssl/${domain}.key
|
||||
Header always set Strict-Transport-Security "max-age=15768000"
|
||||
|
||||
# CSP still causes a lot of problems with Firefox (can't use inline CSS debugger, etc.) so disable for now.
|
||||
# Header set Content-Security-Policy "default-src 'self';"
|
||||
|
||||
# # Below is required to fix a Firefox bug with CSP and SVG images; see https://pokeinthe.io/2016/04/09/black-icons-with-svg-and-csp/
|
||||
# <FilesMatch "\.svg$">
|
||||
# Header set Content-Security-Policy "default-src 'none'; frame-ancestors 'none'; style-src 'self' 'unsafe-inline';"
|
||||
# </FilesMatch>
|
||||
Header set Content-Security-Policy "default-src 'self';"
|
||||
|
||||
# Log downloads
|
||||
SetEnvIf Request_URI "\.epub$" logdownload
|
||||
|
@ -131,7 +124,8 @@ Define domain standardebooks.test
|
|||
|
||||
# Forward all PHP requests to the php-fpm pool for this domain.
|
||||
<FilesMatch \.php$>
|
||||
SetHandler "proxy:unix:/run/php/${domain}.sock|fcgi://${domain}"
|
||||
SetHandler "proxy:unix:/run/php/${domain}.sock|fcgi://${domain}"
|
||||
Header set Cache-Control "no-store"
|
||||
</FilesMatch>
|
||||
|
||||
# Set some proxy properties.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue