fix: resolver problema de URLs sin extensión .html en producción y staging #45
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
📝 Descripción
Soluciona el problema #41 donde URLs como
https://pythoncdmx.org/meetups/no funcionan en producción ni staging, perohttps://pythoncdmx.org/meetups/index.htmlsí funciona. El problema afecta tanto al ambiente de producción como al de staging.🏷️ Tipo de Cambio
🔧 Cambios Realizados
use_directory_urls: truepara configuración correcta de URLsurl_rewritepara manejar URLs sin extensión✅ Checklist de Verificación
mkdocs serve)🔧 Cómo Funciona la Solución
CloudFront Function
La función intercepta las requests y:
/, agregaindex.html(ej:/meetups/→/meetups/index.html).html(ej:/about→/about.html)Ambientes Afectados
https://pythoncdmx.org/meetups/https://staging.pythoncdmx.org/meetups/📸 Capturas de Pantalla (si aplica)
Antes
https://pythoncdmx.org/meetups/→ Error 404https://staging.pythoncdmx.org/meetups/→ Error 404Después
https://pythoncdmx.org/meetups/→ Funciona correctamentehttps://staging.pythoncdmx.org/meetups/→ Funciona correctamente🔗 Issues Relacionados
Fixes el problema reportado de URLs sin extensión en producción y staging
📋 Notas Adicionales
Despliegue Requerido
IMPORTANTE: Este fix requiere aplicar cambios de Terraform antes del despliegue:
cd terraform terraform plan terraform applyCommits Incluidos
fix(config): agregar use_directory_urls para manejar URLs sin extensiónfeat(infra): implementar CloudFront Function para URLs sin extensióndocs: agregar documentación para fix de URLs sin extensiónfeat(infra): aplicar CloudFront Function a staging environmentdocs: actualizar documentación con soporte para stagingVerificación Post-Despliegue
Después del despliegue, verificar que funcionen:
https://pythoncdmx.org/meetups/https://staging.pythoncdmx.org/meetups/https://pythoncdmx.org/about/https://staging.pythoncdmx.org/about/Notas Técnicas