Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

183
Vistas
Strapi CMS Get Bad Request when starting Admin Panel

i have a really strange behavour. I dockerized my Strapi CMS App and everything worked fine until a few days ago. Now i cannot start the application without getting the following error on loading:

In console:

[2022-04-25 11:40:11.922] error: Malicious Path BadRequestError: Malicious Path
at resolvePath (MY_PATH/backend/node_modules/resolve-path/index.js:78:11)

In Browser:

enter image description here

It calls the following URL:

http://0.0.0.0:1337//admin/init

I noticed the // after the port. When i curl http://0.0.0.0:1337/admin/init i get the following response:

{"data":{"uuid":"SOME_UUID","hasAdmin":true}}

But that doesnt help me.

This is my server.js:

  module.exports = ({ env }) => ({
  host: env('HOST'),
  port: env.int('BACKEND_PORT'),
  //url: env("PUBLIC_URL"),
  app: {
    keys: env.array('APP_KEYS'),
  },
});

In my .env file is set the following:

HOST=localhost 
BACKEND_PORT=1337

It would be awesome if anyone could help me, i am stuck with this problem for a few days. :/ Thank you!

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

After testing a loooot of stuff i was really with my latin at the end, like we germans like to say for "i have absolutely no idea what is going on here". So at some point i thought this was a bug within strapi. After heavy weird "hooking into my node_modules and editing urls their" i realized, that when i use docker-compose to spin up my containers there is some kind of cache even if i rebuild the images.

So i started docker compose with:

docker-compose up --build -d

So turned out a few days ago i added a backslash to the STRAPI_ADMIN_BACKEND_URL and/or PUBLIC_URL environment variable and this was some kind of cached the whole time..

So if you have the same problem, make sure that your .env file inside your docker container is correct and do compose with the --build flag to make sure everything is builded new until you fixed your bug. You can also exec -it into the container als check with nano how the .env file looks.

Hope this saves someone some time.

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda