Posted in Manual Testing

CORS: Test a URL’s Cross origin policy

During testing we sometimes face issues with CORS issue as below:

Access to XMLHttpRequest at ‘https://domainname.com’ from origin ‘null’ has been blocked by CORS policy: No ‘Access-Control-Allow-Origin’ header is present

What is CORS?

Cross-Origin Resource Sharing (CORS) is a mechanism that uses additional HTTP headers to tell browsers to give a web application running at one origin, access to selected resources from a different origin. A web application executes a cross-origin HTTP request when it requests a resource that has a different origin (domain, protocol, or port) from its own.

Source: https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS

How to Test?

I found an easy and beautifully explained article by Nick Gibbon

Read Here

Leave a comment