Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

197
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!