Found a solution using nginx named locations:
location = / {
add_header Cache-Control no-cache;
expires 0;
try_files /index.html =404;
}
location / {
gzip_static on;
try_files $uri @index;
}
location @index {
add_header Cache-Control no-cache;
expires 0;
try_files /index.html =404;
}