You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
run bun run reproduction.ts
and access http://localhost:3000/test/hogehoge.js or http://localhost:3000/test/fugafuga.png something so on,
then you will see the output is http://localhost:3000/ instead of expected http://localhost:3000/hogehoge.js or http://localhost:3000/fugafuga.png.
Environment
Linux 6.9.3-3
bun 1.1.15
elysia 1.0.25
@elysiajs/static 1.0.3
The text was updated successfully, but these errors were encountered:
What happen?
When you are using
staticPlugin({prefix: '/'})
withmount()
method,Your fetch function faces
req.url
argument will rewrited as/
all times.Reproduction code
reproduction.ts
run
bun run reproduction.ts
and access
http://localhost:3000/test/hogehoge.js
orhttp://localhost:3000/test/fugafuga.png
something so on,then you will see the output is
http://localhost:3000/
instead of expectedhttp://localhost:3000/hogehoge.js
orhttp://localhost:3000/fugafuga.png
.Environment
The text was updated successfully, but these errors were encountered: