我正在经历流行的安全沙箱违规行为......
我使用 Google Maps Flex API,现在我想访问 Google Geocoding API。为此,我使用 HTTPService:
<s:HTTPService id="geo_req" url="http://maps.googleapis.com/maps/api/geocode/xml?address={i_address}" result="geo_req_resultHandler(event)" />
但是我违反了沙盒安全性。所以我创建了 crossdomain.xml 为:
<cross-domain-policy xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://www.adobe.com/xml/schemas/PolicyFile.xsd">
<allow-access-from domain="*" secure="false" />
<allow-http-request-headers-from domain="*" headers="*"/>
</cross-domain-policy>
我使用 WAMP 服务器,可以通过键入http://localhost/crossdomain.xml来访问该文件……但我仍然无法访问该 url。
我怎样才能摆脱这个?