#BaseURL in the admin panel navigation

3 messages · Page 1 of 1 (latest)

untold basalt
#

Hey yall
Our deployment configuration reques us to be behind a prefixed URL. I want to use Payload for a newsletter app, so everything should be prefixed with /newsletter. I updated my next.config.mjs:

const nextConfig = {
  basePath: '/newsletter',
  // Your Next.js config here
}

& My config to:

  serverURL: process.env.PAYLOAD_PUBLIC_SERVER_URL || 'http://localhost:3000',
  routes: {
    admin: '/newsletter/admin',
    api: '/newsletter/api',
  },

As far as I can see for now almost everything works, I have a frontend blog in the same project and it seems to call api correctly behind /newsletter now. The admin panel also works, but clicking a collection from the admin panel redirects me to newsletter/newsletter/admin/collections/users. Anyone has any idea if I did something wrong with my configuration and what?

spiral basinBOT
untold basalt
#

Bump 🙏