You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
But when I do a request with axios I get the error below
xxxxx from origin 'http://localhost:5173/' has been blocked by CORS policy: Request header field authorization is not allowed by Access-Control-Allow-Headers in preflight response.
The text was updated successfully, but these errors were encountered:
But, now not using the CORS Module of Leaf anymore.
At first it did not work with Access-Control-Allow-Origin: *) wildcart. I have changed the origin in the cors module to "http://localhost:5173" instead of wildcart, but still had the same issue.
Ideally I would like to use the CORS module instead, but if I set allowHeaders to * it does not work.
Could you maybe check if allowHeaders is = * that it is like the below by default. Even using array to specify the below does not work.
Hi @phpcodingmaster can you pls share a screenshot of the non-sensitve response headers you get back using the header() vs the one you get back when you use app()->cors().
Can someone please help me?
My API uses the below:
app()->cors([
"origin" => "",
"credentials" => true,
"preflightContinue" => true,
"allowedHeaders" => "",
"methods" => "GET,HEAD,PUT,PATCH,POST,DELETE",
]);
But when I do a request with axios I get the error below
xxxxx from origin 'http://localhost:5173/' has been blocked by CORS policy: Request header field authorization is not allowed by Access-Control-Allow-Headers in preflight response.
The text was updated successfully, but these errors were encountered: