04 June 2014

when use asp.net webapi, by default, it doesn’t allow cors request, that means if the request is coming from a different domain, it will not allow the request to be processed.

but by including cors package into project. it can add the known domain into the white list that allow this domain to fetch the request or use wildcart to match the domain, header and http action.

the idea is the server will check the origin from http request header, to see if this request is in the white list, and add the add Allow-corss-origin header into the response header



blog comments powered by Disqus