Open krehak opened 6 months ago
also have a problem with -3 symbs
redirect to root route:
instead
'/demos/**': { redirect: { statusCode: 301, to: '/**' } }
need write
'/demos/**': { redirect: { statusCode: 301, to: '//**' } }
@krehak This feature (to allow mixing dynamic *
/**
and static .js
in the same segment (after last /
) will be available in Nitro v3 only based on rou3 new feature, due to internal changes, we cannot have it in Nitro v2.
dear @reslear please feel free to report on a new issue with runnable reproduction.
Environment
nitro v2.9.6 node v22.0.0 npm v10.5.1
Reproduction
Try to create a redirect or something for certain type of files
Describe the bug
So this is what I have in my config:
This works fine, when I visit "somewhere.js" I got redirected. But If I want it to make it global, like this:
It simply doesn't work. What I tried:
/**.js
,/*.js
,**.js
,*.js
,**/**.js
. I also tried to add\
and\\
in front of the dot, but same results.What kind of glob is used in the pattern? I didn't find in the docs information how to make custom routes for assets.
Additional context
No response
Logs
No response