Error while logout with okta signin widget

I’m following angular tutorial for setting up okta signin widget: Okta Sign-In Widget and Angular | Okta Developer

I’m able to successfully login, but I’m not able to logout in my SPA.

After clicking logout button I have this error logged in console:

Access to fetch at 'https://{domain}{server-name}/v1/revoke' from origin 'http://localhost:4200' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.

The http://localhost:4200 url is added to API → Trusted Origins with type CORS/Redirect

What is need to correctly logout using okta?

Can you open the network tab in your browser before attempting to logout. Before the XHR call to /revoke you should see an OPTIONS call to the same endpoint. In the response headers for the OPTIONS call can you check for the following header,
access-control-allow-origin: http://localhost:4200

I must admit that today everything works fine.
Whatever caused the issue has disappeared.

I can see that header in the OPTIONS request:
access-control-allow-origin http://localhost:4200