我在docker容器中运行keycloak。 Keycloak与角度项目相结合。
问题是在登录后使用keycloak重定向我的角度项目显示以下错误。
XMLHttpRequest cannot load http://localhost:8080/auth/realms/tenant-11/protocol/openid-connect/token. A wildcard '*' cannot be used in the 'Access-Control-Allow-Origin' header when the credentials flag is true. Origin 'http://localhost:4201' is therefore not allowed access. The credentials mode of an XMLHttpRequest is controlled by the withCredentials attribute.
zone.js:664 Error: Uncaught (in promise): undefined
at resolvePromise (zone.js:795)
at resolvePromise (zone.js:766)
at zone.js:844
at ZoneDelegate.webpackJsonp../node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask (zone.js:425)
at Zone.webpackJsonp../node_modules/zone.js/dist/zone.js.Zone.runTask (zone.js:192)
at drainMicroTaskQueue (zone.js:602)
at ZoneTask.webpackJsonp../node_modules/zone.js/dist/zone.js.ZoneTask.invokeTask [as invoke] (zone.js:503)
at invokeTask (zone.js:1427)
at XMLHttpRequest.globalZoneAwareCallback (zone.js:1445)