My ajax request is encountering a 404 error, here is the code:
$.ajax({
type:'GET',
url:'http://localhost:8000/auth/github',
crossDomain:true,
headers:{
'Content-Type':'application/x-www-form-urlencoded',
'Access-Control-Allow-Origin':'*'
},
success:function(data){debugger;}
});
The error is showing like this on chrome : see chrome error
And like this in firefox : see firefox error
I have installed a cors plugin in my browser and tried adjusting the headers, but the error persists in my web console.
Interestingly, accessing my route with Postman does not result in any issues, so I suspect the problem lies with my browser.
Does anyone have a solution to this issue?
I found a similar topic addressing the same error without a resolution yet: Ajax: Response for preflight has invalid HTTP status code 404
Thank you!