Skip to content

Commit 4f0d13b

Browse files
committed
Merge pull request #1 from perusio/D7
updating original
2 parents 692bbc0 + 22a6318 commit 4f0d13b

File tree

3 files changed

+17
-22
lines changed

3 files changed

+17
-22
lines changed

apps/drupal/microcache_fcgi.conf

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -23,29 +23,10 @@ fastcgi_ignore_headers Cache-Control Expires;
2323
## Bypass the cache.
2424
fastcgi_cache_bypass $no_cache;
2525
fastcgi_no_cache $no_cache;
26-
## Add a cache miss/hit status header.
27-
add_header X-Micro-Cache $upstream_cache_status;
26+
2827
## To avoid any interaction with the cache control headers we expire
2928
## everything on this location immediately.
3029
expires epoch;
31-
## Enable clickjacking protection in modern browsers. Available in
32-
## IE8 also. See
33-
## https://developer.mozilla.org/en/The_X-FRAME-OPTIONS_response_header
34-
## This may conflicts with pseudo streaming (at least with Nginx version 1.0.12).
35-
## Uncomment the line below if you're not using media streaming.
36-
## For sites *not* using frames uncomment the line below.
37-
#add_header X-Frame-Options DENY;
38-
## For sites *using* frames uncomment the line below.
39-
#add_header X-Frame-Options SAMEORIGIN;
40-
41-
## Block MIME type sniffing on IE.
42-
add_header X-Content-Options nosniff;
43-
44-
## Strict Transport Security header for enhanced security. See
45-
## http://www.chromium.org/sts. I've set it to 2 hours; set it to
46-
## whichever age you want.
47-
## Uncomment the line below if you're using HTTPS.
48-
#add_header Strict-Transport-Security max-age=7200;
4930

5031
## If you're using a Nginx version greater than 1.1.11 then uncomment
5132
## the line below. See:

nginx.conf

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,9 +163,17 @@ http {
163163
## line below.
164164
add_header X-Frame-Options DENY;
165165

166+
## Enable this if using HTTPS. See sites-available/example.com.conf
167+
## for details.
168+
#add_header Strict-Transport-Security "max-age=7200";
169+
166170
## Block MIME type sniffing on IE.
167171
add_header X-Content-Options nosniff;
168172

173+
## Add a cache miss/hit status header. This can be disabled if not including
174+
## any of the apps/drupal/microcache* files.
175+
add_header X-Micro-Cache $upstream_cache_status;
176+
169177
## Include the upstream servers for PHP FastCGI handling config.
170178
## This one uses the FCGI process listening on TCP sockets.
171179
include upstream_phpcgi_tcp.conf;

sites-available/example.com.conf

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,10 +171,16 @@ server {
171171
ssl_certificate /etc/ssl/certs/example-cert.pem;
172172
ssl_certificate_key /etc/ssl/private/example.key;
173173

174+
# Disable SSL v3 protocol to fix POODLE bug.
175+
ssl_protocols TLSv1.2 TLSv1.1 TLSv1;
176+
174177
## Strict Transport Security header for enhanced security. See
175178
## http://www.chromium.org/sts. I've set it to 2 hours; set it to
176-
## whichever age you want.
177-
add_header Strict-Transport-Security "max-age=7200";
179+
## whichever age you want. However, we can't set this here because adding
180+
## a header will drop all other headers set earlier. See
181+
## http://nginx.org/en/docs/http/ngx_http_headers_module.html#add_header
182+
## for details. Instead, uncomment this in nginx.conf.
183+
## add_header Strict-Transport-Security "max-age=7200";
178184

179185
root /var/www/sites/example.com;
180186
index index.php;

0 commit comments

Comments
 (0)