CodePudding user response:
$response - & gt; The header ([
'Access - Control - Allow - Origin=& gt; 'http://localhost:8080',
'Access - Control - Allow - the Methods'=& gt; 'GET, POST, PATCH, PUT, DELETE',
'Access - Control - Allow - Headers'=& gt; 'Authorization, the content-type, If - Match, the if-modified-since, If - None - Match, If - Unmodified - Since, X - Requested - With, token, uid, Cookie, Authorization',
'Access - Control - Allow - Credentials'=& gt; The 'true'
]);
The above Credentials
Axios also need to open in the
Axios. Create ({
BaseURL: "http://localhost/",//url=base url + request url
WithCredentials: true,//the send cookies when cross - domain requests
Timeout: 5000//request timeout
})