CORS Issue using keycloak-js v21 with a keycloak-11 image on http

We are using a keycloak-11 image for old installations on http. Our new auth library includes a keycloak-js v21. We want to provide the old flow and the new flow. Is that possible?
Currently we receive CORS errors with the config weborigins: ‘*’ which should allow a call from the app deployed on http.