| 
									
										
										
										
											2025-09-03 14:16:18 -03:00
										 |  |  | server { | 
					
						
							|  |  |  |     listen 80; | 
					
						
							|  |  |  |     server_name localhost; | 
					
						
							|  |  |  |     root /usr/share/nginx/html; | 
					
						
							|  |  |  |     index index.html; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2025-09-10 15:08:14 -03:00
										 |  |  |     # --- BLOQUE PARA BOOTSTRAP.JS (MEJORADO) --- | 
					
						
							| 
									
										
										
										
											2025-09-10 14:58:29 -03:00
										 |  |  |     location = /bootstrap.js { | 
					
						
							| 
									
										
										
										
											2025-09-10 15:08:14 -03:00
										 |  |  |         # 1. Aseguramos que Nginx genere la huella digital ETag. | 
					
						
							|  |  |  |         etag on; | 
					
						
							| 
									
										
										
										
											2025-09-10 14:58:29 -03:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2025-09-10 15:08:14 -03:00
										 |  |  |         # 2. Instrucciones explícitas de no cachear. | 
					
						
							|  |  |  |         expires -1; # Equivalente a 'off', pero a veces más fuerte. | 
					
						
							|  |  |  |         add_header Cache-Control "no-cache, must-revalidate, private"; | 
					
						
							|  |  |  |          | 
					
						
							| 
									
										
										
										
											2025-09-10 14:58:29 -03:00
										 |  |  |         try_files $uri =404; | 
					
						
							| 
									
										
										
										
											2025-09-03 14:55:19 -03:00
										 |  |  |     } | 
					
						
							| 
									
										
										
										
											2025-09-03 17:38:05 -03:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2025-09-10 15:08:14 -03:00
										 |  |  |     # Bloque para activos con hash (sin cambios, ya es correcto) | 
					
						
							| 
									
										
										
										
											2025-09-10 14:58:29 -03:00
										 |  |  |     location ~* \.(?:js|css|png|jpg|jpeg|gif|ico|svg|woff|woff2)$ { | 
					
						
							| 
									
										
										
										
											2025-09-03 17:38:05 -03:00
										 |  |  |         expires 1y; | 
					
						
							|  |  |  |         add_header Cache-Control "public"; | 
					
						
							| 
									
										
										
										
											2025-09-10 14:58:29 -03:00
										 |  |  |         try_files $uri =404; | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2025-09-10 15:08:14 -03:00
										 |  |  |     # Bloque para la SPA (sin cambios) | 
					
						
							| 
									
										
										
										
											2025-09-10 14:58:29 -03:00
										 |  |  |     location / { | 
					
						
							|  |  |  |         try_files $uri $uri/ /index.html; | 
					
						
							| 
									
										
										
										
											2025-09-03 17:38:05 -03:00
										 |  |  |     } | 
					
						
							| 
									
										
										
										
											2025-09-03 14:16:18 -03:00
										 |  |  | } |