- Profile view: gradient hero banner with overlapping avatar, status badges (phone verified, email, pro state), gender field, city from flat API endpoint, manual validation - nginx: JS files use no-cache/must-revalidate instead of 1y immutable to prevent stale deploys Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
39 lines
1.0 KiB
Nginx Configuration File
39 lines
1.0 KiB
Nginx Configuration File
server {
|
|
listen 80;
|
|
root /usr/share/nginx/html;
|
|
index index.html;
|
|
|
|
location = /favicon.ico {
|
|
rewrite ^ /favicon.png permanent;
|
|
}
|
|
|
|
# HTML, manifest y service worker: nunca en cache
|
|
location ~* \.(html|json)$ {
|
|
expires -1;
|
|
add_header Cache-Control "no-cache, no-store, must-revalidate";
|
|
add_header Pragma "no-cache";
|
|
try_files $uri $uri/ /index.html;
|
|
}
|
|
|
|
# JS: revalidar siempre (304 si no cambió → rápido, pero nunca sirve stale)
|
|
location ~* \.js$ {
|
|
expires 0;
|
|
add_header Cache-Control "no-cache, must-revalidate";
|
|
try_files $uri =404;
|
|
}
|
|
|
|
# Imágenes, fuentes e íconos: cache larga (no cambian sin renombrar)
|
|
location ~* \.(png|jpg|jpeg|gif|ico|svg|woff|woff2|ttf)$ {
|
|
expires 1y;
|
|
add_header Cache-Control "public, immutable";
|
|
}
|
|
|
|
# Flutter Web SPA
|
|
location / {
|
|
try_files $uri $uri/ /index.html;
|
|
}
|
|
|
|
gzip on;
|
|
gzip_types text/plain text/css application/json application/javascript text/javascript;
|
|
}
|