Skip to content

fix(routes): discover routes under routes/.well-known - #508

Merged
cpojer merged 1 commit into
voidzero-dev:mainfrom
meganemura:fix/well-known-routes
Oct 21, 2026
Merged

cpojer merged 1 commit into
voidzero-dev:mainfrom
meganemura:fix/well-known-routes

Conversation

@meganemura

Copy link
Copy Markdown
Contributor

Route files under routes/.well-known/ are not discovered, because the convention file glob skips every dot path. So a well-known URI (RFC 8615) whose response is built at request time cannot be a route. For example, routes/.well-known/apple-app-site-association.ts that reads the app ID from c.env is ignored, and the app has to rewrite the path to another route instead.

This change adds a .well-known/** pattern to the glob. Other dot paths are still skipped. Static well-known files in public/ are not affected.

A new test in scan.test.ts fails on main and passes with this change.

The convention file glob skipped every dot path, so a route such as
/.well-known/security.txt could not be a file.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CZxFCFRcYc9ojkUsSvuz5j

@cpojer cpojer left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That makes sense, thanks for the fix!

@cpojer
cpojer merged commit cbbb5a0 into voidzero-dev:main Oct 21, 2026
2 checks passed
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.

2 participants