Nginx How to map Nginx http response header?

Dan18

Fan
Joined
Jun 9, 2014
Messages
732
I tried several configs but seems to not work, like...
Code:
map $http_x_litespeed_cache_control $nocacheheader {
    default      0;
    no-cache   1;
    }
Code:
map $upstream_http_x_litespeed_cache_control $nocacheheader {
    default      0;
    no-cache   1;
    }
Code:
map $sent_http_x_litespeed_cache_control $nocacheheader {
    default      0;
    no-cache   1;
    }
Page is still cached.
What is the correct format?

My HTTP response header:
x-litespeed-cache-control no-cache
Thanks!
 
Top