這個方法必須要能在目標domain的跟目錄中放入crossdomain.xml為前提
crossdomain.xml的內容為(全domain):
1 2 3 4 5 | <?xml version="1.0" ?> <!DOCTYPE cross-domain-policy SYSTEM "http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd"> <cross-domain-policy> <allow-access-from domain="*" secure="true" /> </cross-domain-policy> |
或是個別domain:
1 2 3 4 5 | <?xml version="1.0" ?> <!DOCTYPE cross-domain-policy SYSTEM "http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd"> <cross-domain-policy> <allow-access-from domain="*.example.com" secure="true" /> </cross-domain-policy> |