mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Signed-off-by: Roman <ixrock@gmail.com> Signed-off-by: Roman <ixrock@gmail.com>
This commit is contained in:
parent
6422d8183f
commit
c33a5f12ea
@ -15,7 +15,7 @@ const devStaticFileRouteHandlerInjectable = getInjectable({
|
|||||||
const proxyTarget = `http://127.0.0.1:${webpackDevServerPort}`;
|
const proxyTarget = `http://127.0.0.1:${webpackDevServerPort}`;
|
||||||
|
|
||||||
return async ({ raw: { req, res }}: LensApiRequest<"/{path*}">): Promise<RouteResponse<Buffer>> => {
|
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`;
|
req.url = `${publicPath}/index.html`;
|
||||||
} else if (!req.url.startsWith("/build/")) {
|
} else if (!req.url.startsWith("/build/")) {
|
||||||
return { statusCode: 404 };
|
return { statusCode: 404 };
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user