Skip to content

Commit

Permalink
fix: add / to routeRules path
Browse files Browse the repository at this point in the history
  • Loading branch information
gioboa committed Jan 7, 2025
1 parent 7ded057 commit 3915d21
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/core/config/resolvers/route-rules.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,11 @@ export function normalizeRouteRules(
config: NitroConfig
): Record<string, NitroRouteRules> {
const normalizedRules: Record<string, NitroRouteRules> = {};
for (const path in config.routeRules) {
for (let path in config.routeRules) {
const routeConfig = config.routeRules[path] as NitroRouteConfig;
if (!path.startsWith('/')) {
path = `/${path}`
}
const routeRules: NitroRouteRules = {
...routeConfig,
redirect: undefined,
Expand Down

0 comments on commit 3915d21

Please sign in to comment.