1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

Page refresh is broken in development mode, fixes #6818

Signed-off-by: Roman <ixrock@gmail.com>
This commit is contained in:
Roman 2022-12-29 12:29:17 +02:00
parent 37c3d65714
commit 4ff3c0b1bb

View File

@ -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 };