Skip to content

fix: update server middleware path for ARK to use Hono regex syntax#27

Open
gabestein wants to merge 1 commit into
mainfrom
gs/ark-fix
Open

fix: update server middleware path for ARK to use Hono regex syntax#27
gabestein wants to merge 1 commit into
mainfrom
gs/ark-fix

Conversation

@gabestein

Copy link
Copy Markdown
Member

The previous middleware syntax app.use('/ark\\:*', ...) was meant for Next. In Hono, it silently failed becayse the backslash-escape colon syntax is not supported in Hono 4.

Fix: /:arkpath{ark:.*} uses Hono's regex-constrained parameter syntax. It captures any path whose first segment matches ark:.*, which correctly matches /ark:NAAN/... while excluding all other routes like /api/... or /other. c.req.path still returns the full original path, so the middleware logic is unaffected.

@gabestein gabestein requested a review from isTravis June 12, 2026 15:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant