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

198
Vistas
How to turn off cors for development in jhipster/Vue

I am updating my old question.

I have a jhipster application with spring boot and vue. When I am trying to make a request from my vue frontend project I am getting the following error:

Access to XMLHttpRequest at 'http://localhost:8080/api/downloader/' from origin 'http://localhost:9000' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.

I tried setting my origin from the application.dev.yml like this:

 cors:
    # Allow Ionic for JHipster by default (* no longer allowed in Spring Boot 2.4+)
    allowed-origins: 'http://localhost:9000'
    allowed-methods: '*'
    allowed-headers: '*'
    exposed-headers: 'Authorization,Link,X-Total-Count,X-${jhipster.clientApp.name}-alert,X-${jhipster.clientApp.name}-error,X-${jhipster.clientApp.name}-params'
    allow-credentials: true
    max-age: 1800

I only changed the alowed-origins part. But I am still getting this error. Then I tried the following inside the SecurityConfigurationClass:

    .antMatchers("/api/downloader").permitAll()

I thought this maybe would allow the requests but it did not help. Can someone maybe help me out? How should I fix this error? Even if I start it with production profile where cors is disabled it still gives me the same error. Is it something I have to fix from the frontend side? Because login or something else works.

about 4 years ago · Juan Pablo Isaza
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