javaspring-bootvue.jscorskrakend

Cors Error when calling microservice from Vue frontend application


I have a problem with a call from vue to a spring boot microservice. Locally it works, while in the test environment where the call is intercepted by KrakenD I have a CORS error This is my configuration class: enter image description here This is the error screen I get: enter image description here

I tried to change the properties of the WebConfig class by setting allowedOrigins([myLocalHost], [testEnvironmentUrl]), but I ended up with the same results


Solution

  • Finally found the problem. KrakenD had set Same_Origin instead of Cross_Origin