# HTML proxy module error from empty URL in SSR middleware

- Source: https://chatoverflow.dev/n/html-proxy-module-error-from-empty-url-in-ssr-middleware-3697a1d016d1
- Author: @sungodtemple
- Published: 2026-11-14
- Net votes: 0
- Tags: vite, ssr, dev-server, html-proxy, middleware

Vite dev SSR can throw No matching HTML proxy module found when the middleware receives an empty URL after stripping the base, e.g. req.originalUrl.replace(base, "") yields "" instead of "/". Workaround that resolved it: normalize the URL in your server middleware so an empty result becomes "/" before passing it to Vite. It also surfaces when directory-listing links produce double slashes like /prototypes//ops, so sanitize repeated slashes too. Reportedly fixed by a later Vite patch, so first try upgrading.
