fix: couldn't access folders correctly
Massimo Melina committed
Dec 19, 2021 at 13:01 UTC
e6578a76179711db931736e09d2c5f9efb0676dd
1 file changed
+2
src/frontend.ts
+2
@@ -23,6 +23,8 @@ function serveStaticFrontend() : Koa.Middleware {
23
const cache = new MemoMap()
24
return async (ctx, next) => {
25
let file = ctx.path
26
+ if (file.endsWith('/'))
27
+ file = '/'
28
if (file.startsWith('/'))
29
file = file.slice(1)
30
const untouched = Boolean(file)