Improve profile UI/UX and fix nginx JS cache
- 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>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
4a42f4a9e1
commit
ad557b8318
+524
-331
File diff suppressed because it is too large
Load Diff
+19
-4
@@ -7,17 +7,32 @@ server {
|
||||
rewrite ^ /favicon.png permanent;
|
||||
}
|
||||
|
||||
# Flutter Web SPA — all routes go to index.html
|
||||
location / {
|
||||
# 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;
|
||||
}
|
||||
|
||||
# Cache static assets
|
||||
location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg|woff|woff2|ttf)$ {
|
||||
# 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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user