CORS error for 'Access-Control-Allow-Origin'' despite having origin set in middlewares.ts

Having an issue where using fetch with credentials: 'include' set in the POST/fetch still sees * in the preflight header.

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

I found this issue from a bug report after a lot of digging and used this solution: CORS middleware not working in Strapi 5.0.0-rc.9 · Issue #20971 · strapi/strapi · GitHub

Though I am not sure if this should be the accepted answer, it works for me.

Works for me aswell, you are a life saver.