1

I want to protect my site from DoS attacks and I want to change some http headers. At present I have the following headers:

Request URL:https://www.mysite.co.uk/
Request Method:GET
Status Code:200 
Remote Address:127.0.0.1:12345
Referrer Policy:no-referrer-when-downgrade
cache-control:no-store, no-cache, must-revalidate, post-check=0, pre-check=0
content-encoding:gzip
content-length:11964
content-type:text/html; charset=UTF-8
date:Wed, 14 Mar 2018 20:52:31 GMT
expires:Thu, 19 Nov 1981 08:52:00 GMT
host-header:192fc2e7e50945beb8231a492d6a8024
pragma:no-cache
server:nginx
 set-cookie:frontend=e7cv00141jn6hn1ijipjss7aq1; expires=Thu, 15-Mar-2018 
20:52:30 GMT; Max-Age=86400; path=/; domain=www.mysite.co.uk; 
httponly
status:200
vary:Accept-Encoding,User-Agent,Origin
x-content-type-options:nosniff
x-frame-options:SAMEORIGIN
x-proxy-cache:MISS
x-sucuri-cache:MISS
x-sucuri-id:11005
x-xss-protection:1; mode=block

How do I change the cache control to this => Cache-Control: max-age=600 and Vary: Cookie headers set on the most visited pages so my pages would be cached according to the session cookie? Can this be done without installing any extension? Is it possible to do it from the htaccess file? ANy pointers is much appreciated.

  • to protect from DDOS you need to configure firewall and install Varnish cache... – MagenX Mar 15 '18 at 10:07
  • I have installed the Sucuri firewall (see headers) but still under attack. My question was whether it was possible to change the headers without installing Varnish. – Shakamal Mar 15 '18 at 10:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.