My config for my Angular 6 app:
server {
listen 80 default_server;
root /usr/share/nginx/html;
index index.html;
server_name localhost;
try_files $uri $uri/ /index.html;
expires 0;
add_header Cache-Control private;
add_header Cache-Control must-revalidate;
location / {
add_header Cache-Control no-store;
add_header Cache-Control no-cache;
}
location /assets/fonts {
}
}
When I push F5 I get "404 Not Found"
If I change config to:
server {
listen 80 default_server;
root /usr/share/nginx/html;
index index.html;
server_name localhost;
location / {
try_files $uri $uri/ /index.html?$args;
expires 0;
add_header Cache-Control private;
add_header Cache-Control no-store;
add_header Cache-Control no-cache;
add_header Cache-Control must-revalidate;
}
}
My page reloads successfully.
But I need to configure the cache settings for /assets/fonts. How to fix it?
Thank you.
location /assets/fonts{...to the second config?