Problems with okta & cors in kubernetes

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 '' (redirected from '') from origin '' 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

Hi @advii,

Could you let us know how you are accessing /authorize ?
As mentioned in the doc, when making requests to the /authorize endpoint, the browser (user agent) should be redirected to the endpoint. You can’t use AJAX with this endpoint.

not sure what would be the answer to this question:/
in my okta application in okta console I have the following settngs:
Client acting on behalf of a user

x Authorization Code

Refresh Token

x Implicit (Hybrid)

x Allow ID Token with implicit grant type

x Allow Access Token with implicit grant type

Login redirect URIs 


Logout redirect URIs 


Login initiated by App Only

Initiate login URI http://localhost:8080/login/oauth2/code/okta

As of the angular frontend app I have just used the standard okta angular package and my setup looks like this:

const oktaConfig = {
  issuer: '',
  redirectUri: window.location.origin + '/implicit/callback',
  clientId: '...',
  pkce: false

As I said, it works on localhost with both docker and without docker.

@advii Would you be able to email with the details to troubleshoot further ?