Skip to content

Conversation

@onmax
Copy link
Contributor

@onmax onmax commented Feb 1, 2026

#634 broke /.well-known/skills endpoints. Nitro's file-based routing interprets .well-known-skills.ts as a filename, generating wrong URL patterns:

  • Generated: /:pkg/.well-known-skills
  • Expected: /:pkg/.well-known/skills/**

Broken URLs (prod):

Fixed URLs (preview):

This reverts to the middleware approach from #630 which uses regex matching to handle the path correctly. ISR caching rules in nuxt.config.ts remain unchanged.

Why two handlers?

Middleware runs on every request, so we need:

  1. Outer defineEventHandler - checks URL match, returns undefined for non-matching paths (passes through to Nuxt)
  2. Inner defineCachedEventHandler - only caches matching requests

Routes could use a single defineCachedEventHandler because file-based routing only sends matching URLs to that handler.

@vercel
Copy link

vercel bot commented Feb 1, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
npmx.dev Ready Ready Preview, Comment Feb 1, 2026 0:17am
2 Skipped Deployments
Project Deployment Actions Updated (UTC)
docs.npmx.dev Ignored Ignored Preview Feb 1, 2026 0:17am
npmx-lunaria Ignored Ignored Feb 1, 2026 0:17am

Request Review

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