CORS error - Even CORS is allowed for the domain - status 200 in network tab
Hi,
I am getting CORS error in my website. Even though I am getting status 200 in network tab as CORS was allowed for the domain.
jquery-2.1.4.min.js:4 Access to XMLHttpRequest at 'https://authuat.mysite.com/api/users' from origin 'http://etgsit.hrt.uyetr.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
In Nework tab, I am getting status 200 for the API https://authuat.mysite.com/api/users as CORS was allowed for domain http://etgsit.hrt.uyetr.com
Tip: http://etgsit.hrt.uyetr.com fails to resolve in DNS, so you'll have to fix this first or use an /etc/hosts entry, which will likely fail in many subtle ways for an API system.
Dinesh Bali
ASKER
Hi,
URL is resolving that is the reason it is giving 200 status in network tab.
It is working now. It was not working because of cookie policy.
I have updated my config to access in https only and I was accessing site in http.