luceos
askvortsov
Thank you for your suggestion luceos, and I accidentally discovered what I did wrong, and now i'm able to make GET calls from localhost (or from other IP)
My mistake was including "Content-Type" and "Access-Control-Allow-Origin" in the headers while making API Get calls. After removing them, my web application on localhost can now retrieve the information.
However, while making /api/token API request, I'm still hit with a CORS error.
I'm going to share my javascript code, and hopefully someone can point out if I did anything wrong here.
Appreciate it!
fetch('http://34.125.63.243/flarun/public/api/token', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Access-Control-Allow-Origin': '*'
},
body: JSON.stringify({'identification': 'xxx', 'password': 'xxxxxxxx'})
})