Error when accessing strapi admin panel

Hi,

I’ve run into very similar issue. I am trying to start strapi in local environment but i receive the same error. The error starts to throw whenever I try to modify the url property in server.ts. When the property is not set at all, everything works fine.

The solution I am aiming to achieve is to prefix all urls in entire api.

Content of my server.ts

export default ({ env }) => ({
  host: env('STRAPI_HOST'),
  port: env.int('STRAPI_PORT'),
  url: 'CLIENT_ID_PLACEHOLDER',
  app: {
    keys: env.array('STRAPI_APP_KEYS')
  }
});

I tried adding ‘/’ at the beginning of url property, but the result is the same.

As for now I am using strapi in version 4.3.2, but I also checked latest strapi version (quickstart) for js and ts and the issue remains.

image

I also tried to pass to the property an absolute urls, just like documentation says, but it did not solve the issue.

What values I tried:

http://localhost:1337/CLIENT_ID_PLACEHOLDER
http://0.0.0.0:1337/CLIENT_ID_PLACEHOLDER
1 Like