diff --git a/nuxt.config.ts b/nuxt.config.ts
index b8dd18ad..18e97132 100644
--- a/nuxt.config.ts
+++ b/nuxt.config.ts
@@ -29,9 +29,9 @@ export const locales = localesConst as unknown as LocaleObject[];
export default defineNuxtConfig({
runtimeConfig: {
- locales,
public: {
baseUrl,
+ locales,
}
},
css: [
diff --git a/server/plugins/i18nRedirector.ts b/server/plugins/i18nRedirector.ts
index 03d9215c..71c6237f 100644
--- a/server/plugins/i18nRedirector.ts
+++ b/server/plugins/i18nRedirector.ts
@@ -14,7 +14,7 @@ export default defineNitroPlugin((nitroApp) => {
}
const runtimeConfig: MiHubRuntimeConfig = useRuntimeConfig();
- if (!event.path.match(new RegExp(`^/(${runtimeConfig.locales.map((l) => l.code).join('|')})/`))) {
+ if (!event.path.match(new RegExp(`^/(${runtimeConfig.public.locales.map((l) => l.code).join('|')})/`))) {
const links = runtimeConfig.locales.map((l) => {
const url = withTrailingSlash(`/${l.code}${event.path.replace(/\.html$/g, '/')}`);
return `
${l.name}`;