I’ve got an Angular app connecting to a Spring boot API and both are protected by okta with the means of the same "application. It works properly locally, it also works if I run my angular and spring boot docker containers locally but I have problems on my remote kubernetes.
I can login to okta with my angular (frontend) app, I can also login to my spring boot (backend app). I can retrieve data from the backend api by entering the right REST address in the browser. But when I try to access the backend from frontend, I get the following error:
Access to XMLHttpRequest at 'https://dev-933944.okta.com/oauth2/default/v1/authorize?response_type=code&client_id=0oa213871t9STk5R8357&scope=openid%20profile%20email&state=hjJmBYKm8qjNiIK_hOshBWcsO8KQTNYpPS1NIiMupWs%3D&redirect_uri=https://backend-svc-dxfkonrad.cloud.okteto.net/login/oauth2/code/okta&nonce=NSHty47EoLbXyCh7zkiXWt3jEDcZIQo0yTg_XVcYp1M' (redirected from 'https://backend-svc-dxfkonrad.cloud.okteto.net/follow-me/tracks') from origin 'https://frontend-svc-dxfkonrad.cloud.okteto.net' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
Both the localhost and the kubernetes frontend app addresses are entered in the allowedOrigins in the backend app.
Anybody had such a problem? As I said, it works locally.
Thank you in advance