Skip to content

Commit 97ece42

Browse files
junwei99Low Jun Wei
andauthored
fix: fix invalid route path in koa router (#96)
Co-authored-by: Low Jun Wei <[email protected]>
1 parent ba3e7fc commit 97ece42

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

server/middle/router.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ module.exports = function (channelManager, domain, cdn, basePath) {
6464
});
6565

6666
function createStatic(prefix, folder) {
67-
router.get(`${basePath}${prefix}/*static`, async ctx => {
67+
router.get(`${basePath}${prefix}/:staticPath(.*)`, async ctx => {
6868
await send(ctx, ctx.path.slice(basePath.length + prefix.length), {
6969
root: path.resolve(__dirname, `../..${folder}`),
7070
maxAge,

0 commit comments

Comments
 (0)