Public pages: a trailing slash gives 404
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
- 88/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- typescript
Línea de trabajo
Lee route en src/index.ts, especialmente sus redirecciones existentes y el 404 final; después, revisa las pruebas de redirección en test/index.test.ts y cómo llaman a worker.fetch. Añade pruebas para las redirecciones de barras finales en GET y HEAD, la conservación de la cadena de consulta, / y las solicitudes POST. El trabajo estará terminado cuando pasen las redirecciones y exclusiones requeridas, junto con npm run typecheck y npm test.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
These answer 404 "not found" on oss.codercops.com today:
- https://oss.codercops.com/leaderboard/
- https://oss.codercops.com/leaderboard/2026-10/
- https://oss.codercops.com/leaderboard/2026-10/u/bhushan4work/
Without the trailing slash, all three load. A slash is easy to add by hand or when someone copies a link, and the page should still open.
The page patterns end at $ with no optional / (LEADERBOARD_PATH and LEADERBOARD_IMAGE_PATH in src/programs.ts, lines 32 and 35, and CONTRIBUTOR_PATH in src/index.ts, line 214), so these paths fall through to the 404 at the end of route (src/index.ts, line 378).
What to do
- In
route(src/index.ts, line 341), answer a GET or HEAD for a path that ends in/(other than/itself) with a 301 to the same path without the trailing slashes, and keep the query string. - Only GET and HEAD:
POST /interactionsandPOST /githubstay as they are.
Where to look
src/index.ts:route(line 341), the existing redirects (lines 353 to 358) and the 404 (line 378)test/index.test.ts: the redirect tests start at line 106 and show how to callworker.fetch
Acceptance criteria
-
/leaderboard/,/leaderboard/2026-10/and/leaderboard/2026-10/u/ada/answer a 301 to the same path without the slash, and/leaderboard/2026-10/?x=1keeps?x=1 - HEAD gets the same redirect
-
/doesn't change, and POST requests are never redirected - Tests for these cases
-
npm run typecheckandnpm testpass
Want to work on this? Comment below and I'll assign it to you. Please take one issue at a time, branch off develop, and open your PR against develop with Closes #56 in the description.
- Lenguaje dominante
- TypeScript
- Estrellas
- 0
- Forks
- 1
- Merge medio
- 14 h 21 min
- PR fusionados (30 d)
- 30
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una 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 codercops/discord-bot
-
bug good first issue hacktoberfest
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
codercops/discord-bot#58 ·
Los mantenedores suelen responder en 1 día
-
bug good first issue hacktoberfest
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
codercops/discord-bot#57 ·
Los mantenedores suelen responder en 1 día
-
bug hacktoberfest help wanted
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
codercops/discord-bot#59 ·
Los mantenedores suelen responder en 1 día
-
Leaderboard page: name the people who qualify but haven't linked their GitHub yetPosiblemente ocupada @varun-pahuja la tomó hoy. Abiertoenhancement hacktoberfest help wanted
Dificultad 3/5 1-2 días Aptitud para principiantes 76/100
codercops/discord-bot#55 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Hacktoberfest 2026: start hereAbiertohacktoberfest
Dificultad 1/5 Menos de una hora Aptitud para principiantes 15/100
codercops/discord-bot#15 ·
Los mantenedores suelen responder en 1 día
Todos los issues de codercops/discord-bot
Issues similares
-
area:editor bug issue-form:bug P0 platform:windows review: low
Dificultad 2/5 1-3 horas Aptitud para principiantes 64/100
1lck/Lithe-IDEA#1388 ·
Los mantenedores suelen responder en 1 día
-
fix(api): isToolAuditEnabled swallows database read errors on auditToolOperations without loggingAbiertoarea: backend bug priority: low
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
snapotter-hq/SnapOtter#3238 ·
Los mantenedores suelen responder en 1 día
-
rig up --plan times out after 5 s and reports an UNKNOWN outcome while the daemon completes the planAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Los mantenedores suelen responder en 1 día
-
filesystem: search_files does not expand non-wildcard excludePatterns like directory_tree doesAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
modelcontextprotocol/servers#5216 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Los mantenedores suelen responder en 1 día