I need basic login auth api. And I wrote in methods section. I also define mounted this function.
My code like is.
connectHes(){
var session_url = 'url';
axios.post(session_url, {
basicauth: {
username: 'username',
password: 'password'
}},{
headers: {
'Access-Control-Allow-Origin':'*'
}})},
And my console show has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.
Is it vue.js problem or laravel problem or my api is wrong?