I'm caching partials with the intention that Ajax requests can receive them directly from Nginx without hitting my Rails server.
I've tried :
if ($x_requested_with = XMLHttpRequest) {
rewrite ^(.*)$ /ajax/$1 break;
}
which gives me : unknown "x_requested_with" variable.
What should be the approach here?
Thanks.