asp.net - new to cross domain CORS -


i new thing, there questions wanted ask after looking bunch of site related cors.

first of all, lets have http://domain1.com has ajax call http://domain2.com, on http://enable-cors.org/server.html have add

access-control-allow-origin: * 

this response page header or add setting web.config on root directory of application, confused, should add response header domain1 or domain2 application? guess add domain2, cannot sure because don't have required things test it.

furthermore, if domain2.com in https, means calling http https, works?

and how ie?

you should add on http://domain2.com because access-control-allow-origin permission http://domain1.com information http://domain2.com. note (*) symbol means domain allows access everyone, need careful that. better option be:

access-control-allow-origin: http://domain1.com 

it work fine ie , https:

access-control-allow-origin: http://domain1.com, https://domain1.com 

take more information here.


Comments