File tree Expand file tree Collapse file tree 3 files changed +17
-22
lines changed
Expand file tree Collapse file tree 3 files changed +17
-22
lines changed Original file line number Diff line number Diff line change @@ -23,29 +23,10 @@ fastcgi_ignore_headers Cache-Control Expires;
2323## Bypass the cache.
2424fastcgi_cache_bypass $no_cache ;
2525fastcgi_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.
3029expires 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:
Original file line number Diff line number Diff 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;
Original file line number Diff line number Diff 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;
You can’t perform that action at this time.
0 commit comments