Page refresh is broken in development mode #6818 (upcoming fix)

Signed-off-by: Roman <ixrock@gmail.com>
This commit is contained in:
Roman committed 2022-12-29 12:40:21 +02:00
1 parent 87c932f2e5
commit c50828cb27
1 file changed
+1 -1
@@ -15,7 +15,7 @@ const devStaticFileRouteHandlerInjectable = getInjectable({
const proxyTarget = `http://127.0.0.1:${webpackDevServerPort}`;
return async ({ raw: { req, res }}: LensApiRequest<"/{path*}">): Promise<RouteResponse<Buffer>> => {
if (req.url === "/" || !req.url) {
if (req.url === "/" || !req.url || !req.url.startsWith(publicPath)) {
req.url = `${publicPath}/index.html`;
} else if (!req.url.startsWith("/build/")) {
return { statusCode: 404 };