preview-cloudflare: a preview never returns 404, since Cloudflare Pages serves index.html for unknown paths
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 78/100
Línea de trabajo
Empieza leyendo la acción preview-cloudflare y su harness; luego, sigue el rastro de dónde se prepara el directorio de compilación antes de la carga. Comprueba que se cree un 404.html mínimo en el nivel superior solo cuando no exista uno. El trabajo estará terminado cuando el harness cubra ambos casos y una vista previa de Pages en staging devuelva 404 para las rutas desconocidas.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
A Cloudflare Pages preview never answers 404. When a deployment has no top-level 404.html, Cloudflare Pages treats the site as a single-page application and serves the root index.html, with a 200, for every path it doesn't hold. A Jupyter Book build makes no 404.html, and its root index.html is a redirect to the first page. So on a preview-cloudflare preview, a removed page, a removed notebook or a mistyped link lands on the book's first page instead of a 404.
v0.17.0's staged release showed it (QuantEcon/test-actions-lecture-intro#82, push 2, run 42748536799). The push deleted linear_equations and _static/qe-logo-large.png.
- The Netlify preview returned 404 for the page, for
_notebooks/linear_equations.ipynband for the file, and 200 for the controls. - The Cloudflare preview's per-deployment URL returned 200 for all three, and for a made-up path. Each served the same 58-byte root
index.html,<meta http-equiv="Refresh" content="0; url=intro.html" />.
The deleted content itself was gone, so the release was fine. But a reviewer following a broken link on a Cloudflare preview doesn't see that it's broken.
A possible fix: before the upload, preview-cloudflare writes a minimal 404.html into the deploy directory when the build has none. With a top-level 404.html, Cloudflare Pages serves it with a 404 status for unknown paths. A build that already has one keeps it. The harness can check the file is written, and left alone when present; a staged release can check the status codes.
deploy-cloudflare deploys to Workers static assets, whose default not-found handling is a plain 404, so this looks specific to Pages. Confirm that for #145's preview-workers when it is built.
Low priority: previews are mostly read for the pages a pull request changes.
Claude Code (on behalf of mmcky), organiser session
- Lenguaje dominante
- Shell
- Estrellas
- 0
- Forks
- 1
- Merge medio
- 18 h 51 min
- PR fusionados (30 d)
- 58
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de QuantEcon/actions
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 84/100
Los mantenedores suelen responder en 1 día
-
documentation
Dificultad 1/5 1-3 horas Aptitud para principiantes 85/100
Los mantenedores suelen responder en 1 día
-
infrastructure low-priority
Dificultad 4/5 3-5 días Aptitud para principiantes 39/100
Los mantenedores suelen responder en 1 día
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 1/100
Los mantenedores suelen responder en 1 día
-
Canary: schedule `ci.yml` and `publish.yml` ahead of the consumers' Monday builds (PLAN P0 0c)Abiertoinfrastructure low-priority
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
QuantEcon/actions#302 · 1 comentario ·
Los mantenedores suelen responder en 1 día
Todos los issues de QuantEcon/actions
Issues similares
-
Blacklist | solotogelbisa.comAbierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 70/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
MadiroGlobalHealth/UVL-EMR#580 ·
Los mantenedores suelen responder en 1 día
-
Change osia installAbierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 68/100
Kuadrant/testsuite-pipelines#216 ·
Los mantenedores suelen responder en 1 día
-
area: helpers bug good first issue priority: low size: S
Dificultad 2/5 1-3 horas Aptitud para principiantes 90/100
-
area: scripts area: tests bug ci containers developer-experience devops difficulty: easy docker dx good first issue help wanted island: Test Atoll linting quality rank: 8 kyu smoke-tests tech: docker testing tooling
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Los mantenedores suelen responder en 1 día