File tree Expand file tree Collapse file tree 4 files changed +15
-3
lines changed Expand file tree Collapse file tree 4 files changed +15
-3
lines changed Original file line number Diff line number Diff line change 1+ # 1.4.7 - 17 Nov 2025
2+ Bug fix:
3+ - remove trailing slash on Windows
4+
15# 1.4.6 - 3 Nov 2025
26Bug fix:
37- normalize path only when unsafe
Original file line number Diff line number Diff line change 11import { Elysia } from 'elysia'
22import { staticPlugin } from '../src/index'
33
4- const app = new Elysia ( ) . use ( await staticPlugin ( ) ) . listen ( 3000 )
4+ const app = new Elysia ( )
5+ . use (
6+ await staticPlugin ( {
7+ prefix : '/'
8+ } )
9+ )
10+ . listen ( 3000 )
11+
12+ console . log ( app . routes )
513
614await app . modules
Original file line number Diff line number Diff line change 11{
22 "name" : " @elysiajs/static" ,
3- "version" : " 1.4.6 " ,
3+ "version" : " 1.4.7 " ,
44 "license" : " MIT" ,
55 "scripts" : {
66 "dev" : " bun run --watch example/index.ts" ,
Original file line number Diff line number Diff line change @@ -245,7 +245,7 @@ export async function staticPlugin<const Prefix extends string = '/prefix'>({
245245 }
246246
247247 app . onError ( ( ) => { } ) . get (
248- `${ prefix } /*` ,
248+ `${ prefix . endsWith ( '/' ) ? prefix . slice ( 0 , - 1 ) : prefix } /*` ,
249249 async ( { params, headers : requestHeaders } ) => {
250250 const pathName = normalizePath (
251251 path . join (
You can’t perform that action at this time.
0 commit comments