fix: only in DEV mode, couldn't directly browse a folder with a dot in the name
Massimo Melina committed
Apr 25, 2022 at 20:34 UTC
c22179d63e325ac5569adbf1fcdf9548fc500b84
1 file changed
+1
-1
server/src/serveGuiFiles.ts
+1
-1
@@ -58,7 +58,7 @@ function serveProxied(port: string | undefined, uri: string) { // used for devel
58
proxy = lib.default('localhost:'+port, {
59
proxyReqPathResolver: (ctx) => ctx.path.endsWith('/') ? '/' : ctx.path,
60
userResDecorator(res, data, ctx) {
61
- if (!ctx.path.includes('.'))
61
+ if (ctx.path.endsWith('/'))
62
return treatIndex(ctx, String(data), uri)
63
const mod = getModifier(ctx.path, uri)
64
return mod ? mod(String(data)) : data