Skip to content

Commit b05c9dd

Browse files
committed
fix: redirect all dev requests to Vite dev server regardless of hostname
When the server binds to 0.0.0.0 in development (network-accessible mode), requests arriving via a LAN IP were not being redirected to the Vite dev server because of the isLoopbackHostname guard. This caused 503 errors since no static directory exists during development. Remove the hostname check so all requests are redirected when devUrl is configured.
1 parent 2929b17 commit b05c9dd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

apps/server/src/http.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ export const staticAndDevRouteLayer = HttpRouter.add(
219219
}
220220

221221
const config = yield* ServerConfig;
222-
if (config.devUrl && isLoopbackHostname(url.value.hostname)) {
222+
if (config.devUrl) {
223223
return HttpServerResponse.redirect(resolveDevRedirectUrl(config.devUrl, url.value), {
224224
status: 302,
225225
});

0 commit comments

Comments
 (0)