I'm using nginx to rewrite a url

location /ReeferUI/Reports/ {
       rewrite ^ /ReeferUI/index.html break;
       proxy_pass  http://localhost:8083/ReeferUI;
       proxy_set_header Host $host;

It is working fine but it is caching the index.html which I don't want.

How can I prevent browser from caching redirection url?

  • If you don't want content to be cached, set the appropriate cache control headers. – HBruijn May 13 at 12:41
  • @HBruijn Can you suggest how to do that, I am new to nginx. – rahul May 13 at 12:42

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.