From bbea60842857d59a914b4381cc72ee5f40c68a47 Mon Sep 17 00:00:00 2001 From: harshagarwalnyu Date: Sun, 17 May 2026 23:11:48 -0400 Subject: [PATCH] fix(dev): route specific Nitro paths even when URL has asset extension MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Asset-extensioned URLs (e.g. /api/photos/12345.jpg) were routed to Vite's static middleware instead of the matching Nitro handler. The ASSET_EXT_RE guard in nitroDevMiddlewarePre applied unconditionally to any matched route, including specific prefixed catch-alls like /api/photos/**. The guard was introduced (#4234) to prevent a root-level renderer or user catch-all (/**) from swallowing Vite's own