i have a config for my django app deployment with nginx and want to cache some of data
server {
listen 80 default_server;
listen [::]:80 default_server;
root /app/;
location / {
proxy_pass http://landing_page;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host;
proxy_redirect off;
}
location /static/ {
alias /app/staticfiles/;
try_files $uri $uri/ ;
}
location /media/ {
alias /app/media/;
try_files $uri $uri/ ;
}
location ~* \.(svg|ico|woff|woff2|ttf)$ {
expires 1M;
add_header Cache-Control "public";
}}
when i remove cache control from config , nginx work properly and serve data like *.svg but when i enable it cached file wont serve