Skip to content

Commit f638580

Browse files
kckernclaude
andcommitted
refactor(web): drop the unused req.versionFromPath; note the case-insensitive 410 match
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent c2bc538 commit f638580

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

‎apps/web/src/app/routes/index.js‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ FORMAT_PREFIXES.forEach(fmt => {
3838
// Express 4 turns every "*" into "(.*)", even inside a param pattern, so "{0,}" keeps the
3939
// version to the first segment. The dispatch reads req.config (parseRequest), not these params.
4040
router.get('/:version([A-Za-z][A-Za-z0-9]{0,})/:reference(*)',
41-
(req, res, next) => { req.versionFromPath = req.params.version.toUpperCase(); next(); },
4241
configMiddleware,
4342
(req, res, next) => scriptureController.show(req, res, next),
4443
outputMiddleware

‎apps/web/src/app/routes/legacy.js‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ const PHP_PAGES = {
2525
// empty page (410 like hub.*); the rest were maintenance scripts or includes (script.php
2626
// rewrote verse text, mount.php ran a shell command). They are gone. Any other *.php name did
2727
// not exist, so Apache rewrote it to index.php?q=<name>.php: it goes on to the front controller.
28+
// Names match case-insensitively on purpose (/Mount.php is 410 too): Apache matched files
29+
// case-sensitively, so this is more conservative than live.
2830
const PHP_GONE = new Set([
2931
'hub.php', 'mount.php', 'script.php', 'scriptures.php', 'scriptutil.php',
3032
'inc_api.php', 'inc_cov.php', 'inc_img.php', 'inc_latex.php', 'inc_markdown.php', 'inc_mp3.php',

0 commit comments

Comments
 (0)