Welcome! Log In Create A New Profile

Advanced

How to configure so that if this header X-Requested-With XMLHttpRequest was requested Nginx will send answer

Posted by photographer 
Hi!

Please, help me. How to configure so that if this header X-Requested-With XMLHttpRequest was requested, Nginx will send answer in header Cache-Control "no-cache"?


I know it is wrong, just for exsample.
if ($http_x_requested_with = XMLHttpRequest) {
add_header Cache-Control "no-cache";
}

Best regards,
Rostyslav
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 93
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready