From 1e936be59346633acf60986a1f421084f855410c Mon Sep 17 00:00:00 2001 From: Lizandro Guarnizo <77708265+lizandrogd@users.noreply.github.com> Date: Thu, 29 Jan 2026 09:06:03 -0500 Subject: [PATCH] Update default.conf --- docker/nginx/default.conf | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/docker/nginx/default.conf b/docker/nginx/default.conf index d7ff75d..ebbfca1 100644 --- a/docker/nginx/default.conf +++ b/docker/nginx/default.conf @@ -41,9 +41,16 @@ server { # Importante para que webhook responda rápido fastcgi_buffering off; + + # 🚫 ANTI-CACHÉ AGRESIVO PARA ARCHIVOS PHP DINÁMICOS + # Evita que el navegador cachee páginas como conversations.php + add_header Cache-Control "no-store, no-cache, must-revalidate, max-age=0" always; + add_header Pragma "no-cache" always; + add_header Expires "Thu, 01 Jan 1970 00:00:00 GMT" always; + expires off; } - # Webhook endpoint (configuración especial para respuesta rápida) + # Webhook endpoint (configuración especial para respuesta rápida y sin caché) location ~ ^/api/webhook(_optimized)?\.php$ { fastcgi_pass 127.0.0.1:9000; fastcgi_index webhook_optimized.php; @@ -58,8 +65,9 @@ server { fastcgi_read_timeout 60; fastcgi_send_timeout 60; - # No cache - add_header Cache-Control "no-store, no-cache, must-revalidate"; + # Anti-caché (webhook siempre debe procesar en tiempo real) + add_header Cache-Control "no-store, no-cache, must-revalidate, max-age=0" always; + add_header Pragma "no-cache" always; expires off; }