Access-Control-Allow-Origin syntax
问题 I want allow Cross-origin resource sharing from all the sub-domain of from.example.com . So I added Cross-origin resource sharing header as given below to a page in subdomain1.to.example.com . <?php header('Access-Control-Allow-Origin: *.from.example.com'); And I tried to access the page form subdomain1.from.example.com using ajax. I didn't get the response. So I just changed the above header as given below. <?php header('Access-Control-Allow-Origin: http://subdomain1.from.example.com'); It