Closed stesvis closed 2 years ago
You cant use the wildcard (*) in your api when you set credentials to true or include.
You have to set the origins in the configuration of your cors in your api, if you still want to allow cors from anywhere you can use something like that :
{
credentials: true,
/* allow cors from anywhere */
origin: /.*/gm,
}
You cant use the wildcard (*) in your api when you set credentials to true or include.
You have to set the origins in the configuration of your cors in your api, if you still want to allow cors from anywhere you can use something like that :
{ credentials: true, /* allow cors from anywhere */ origin: /.*/gm, }
Thanks for the clarification!
Hello, first of all I would like to ask if this package can be used only in React Native or also in React.
I am using it in React and I am trying to switch from Axios to ApiSauce.
However, my requests always fail due to a CORS issue, while they were working with Axios. My backend already allows CORS [*]
I was curious if it's an issue or if there is a way to make it work in React. A sample error is: