Hi, I'm developing a Nuxt Site using prismic. I've configured the preview for production and local, but i'm having the same issue in both environments. When we press preview it generates an url but almost inmediatly it redirects to homepage.
I'm using i18n to manage the 3 locals (english, spanish and catalan). It works by adding a lang prefix (/en-us/folder-name/[uid]) if the locale is not the default one. In my case i have default locale set to catalan in prismic and in nuxt i18n.
I also setted the preview url to be /api/preview in prismic and in nuxt
Here is my nuxt.config.ts file
i18n: {
locales: [
{
code: "ca",
name: "Cat",
file: "ca.json",
},
{
code: "es-es",
name: "Cast",
file: "es.json",
},
{
code: "en-us",
name: "En",
file: "en.json",
},
],
defaultLocale: "ca",
langDir: "lang/",
},
prismic: {
endpoint: "wavm",
preview: "/api/preview",
clientConfig: {
routes: [
{
type: "page",
path: "/:uid",
},
{
type: "page",
uid: "home",
path: "/",
},
{
type: "page",
uid: "about",
path: "/about",
},
{
type: "page",
uid: "case-studies",
path: "/case-studies",
},
{
type: "page",
path: "/case-studies/:uid",
},
],
},
},
Thanks
Alex