CORS changed in 4.22.0 & my cors settings no longer work but origin ['*'] does

Did I miss a change in the documentation?
I get “is not a valid origin” now

This topic has been created from a Discord post (1225099713293058098) to give it more visibility.
It will be on Read-Only mode here.
Join the conversation on Discord

I encounter this as well. looked everywhere and found no solutions yet.

found some old issues related to this

found the solution
In your package.json
add this

  "resolutions": {
    "@koa/cors": "3.4.1"
},

it works now

ok - submitted a bug - will see. CORS origin can't be set in middleware.js in 4.22.0 · Issue #20033 · strapi/strapi · GitHub