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; }