Hi there,
I'm using OpenLayers for an application I want to develop. Now I want to query a WMS-Service. My problem is, that I'm not allowed to access data on another server because of security reasons concerning XSS
Origin http://localhost:8080 is not allowed by Access-Control-Allow-Origin.
When I run my code inside a Tomcat I can add a proxy.cgi. But eventually I need to build a proper app and I do not have the option to run a Tomcat inside my app. So what option do I have to get the connection right to connect to a different domain?
Here is my code for the Tomcat:
Code:
OpenLayers.ProxyHost = "./cgi-bin/proxy.cgi?url=";
info = new OpenLayers.Control.WMSGetFeatureInfo({
url: wmsURL,
// url: 'http://www.wms.nrw.de/wms/uebersicht_nrw2?',
title: 'More Information',
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));
}
}
});
I would be very thankful for any solution to this problem.
Thanks in advance!
Cliff