Hi there,
I'm facing a little problem. I got an app written in JS+HTML5 using
Sencha Touch 2 and included openlayers in it. For testing reasons I let
the application run in a local tomcat on localhost:8080. Now I'm trying
to retrieve data from a geoserver with the following code...
OpenLayers.ProxyHost =
'http://[GEOSERVER_URL]/geoserver/rest/proxy?url=';
info = new OpenLayers.Control.WMSGetFeatureInfo({
url: wmsURL,
title: 'This is the title',
infoFormat: 'application/vnd.ogc.gml',
layers: [poisWMS],
queryVisible: false,
maxFeatures: 5,
vendorParams: {buffer: 15},
eventListeners: {
getfeatureinfo: function(event) {
setPOIHTML(event.text,map.getLonLatFromPixel(event.xy));
}
}
});
Whenever I try to run it via my app I get the error that
Origin http://localhost:8080 <http://localhost/> is not allowed by
Access-Control-Allow-Origin.
It seems to be a JS problem concerning the same origin policy, which
prevents XSS.
But I have edited the hostname configuration to allow localhost:8080. If
I fetch the request and paste it into the browser I get a file called
'proxy' containing the correct gml.
Can anybody give me a hint on what I am missing? I would be very
thankful for any help.
Thanks a lot!
Cliff
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users