Hello,
I have a problem with my nginx instance. I want to disactivate cache control in only html and json pages.
Il my server configuration I have this:
server {
listen 443 ssl;
server_name myservername.com;
root /var/www/html/myapp;
location /back/ {
proxy_pass http://localhost:8082/;
}
location /inscription {
rewrite ^/inscription(.*)$ https://forms.gle/NRYg4QUDu4oqNYRd9 redirect;
}
location ~* \.(json|html)$ {
add_header Cache-Control "no-cache,no-store";
etag off;
}
# ssl conf
# log conf
}
The cache control works but I have a swagger activated in my back and when I solicit swagger I have 404 page. In log I notice that le swagger request is rediriged to static site instead of being redirected to the back.
How I implement Cache control for all html and static pages without infect the redirect by location?
Thanks