Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/runtime/server/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ export default defineNitroPlugin(async (nitro) => {
const detector = useDetectors(event, detection)
const localeSegment = detector.route(event.path)
const pathLocale = (isSupportedLocale(localeSegment) && localeSegment) || undefined
const path = (pathLocale && url.pathname.slice(pathLocale.length + 1)) ?? url.pathname
const path = (pathLocale && event.path.slice(pathLocale.length + 1)) ?? event.path

// attempt to only run i18n detection for nuxt pages and i18n server routes
if (!url.pathname.includes(__I18N_SERVER_ROUTE__) && !isExistingNuxtRoute(path)) {
Expand Down