server { listen 80; listen [::]:80; server_name _; root /usr/share/nginx/html; index index.html; # Tinode webapp uses real (History API) client-side routing, so any unknown path # can safely fall back to index.html -- the app resolves the actual view/topic # client-side from the path itself once index.html loads. location / { try_files $uri $uri/ /index.html; } # Filenames here aren't content-hashed, so a long/immutable cache would keep # serving a stale bundle after every deploy. Force revalidation instead: # cheap 304s when unchanged, immediate pickup of new content when not. location /umd/ { add_header Cache-Control "no-cache"; } location /img/ { add_header Cache-Control "public, max-age=86400"; } }