Cookie auth, CORS Access-Control-Allow-Origin problem

Hello community, I am developing an app with cookie authentication, so I have problems with CORS when setting the Access-Control-Allow-Origin on the server, when using withCredential = “true”, I can’t use wildecar (*), so it’s supposed to you should put the sources separately, Dev: “http://localhost:8100”, Prod-Android: http://localhost, Prod-IOS: ionic://localhost. In this way I am not successful either. What would be the correct configuration in this case, I have tried some supposed solutions and I can not stop having problems communicating with the api. I would like to thank you for any help, I have already spent more time than necessary on this.
Thanks in advance.