Answer the question
In order to leave comments, you need to log in
How to make nginx caching proxy return last-modified from backend?
It is necessary to force the caching proxy on nginx to give the last-modified header from the backend (the backend provides it). The location configuration is as follows:
location /file.js {
proxy_pass http://some-domain.com;
sub_filter "subject" "replacement";
sub_filter_types "text/javascript";
sub_filter_once off;
proxy_set_header Accept-Encoding "";
proxy_pass_header Server;
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question