Geoserver Cross domain request
I have a Geoserver installed as service and IIS server with my openlayer application. Every time when i tried send GetFeatureInfo request i got an error:
1
2
3
4
Cross-Origin Request Blocked:
The Same Origin Policy disallows reading the remote resource at
http://localhost:8080/geoserver/robot/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=robot:geofield&outputFormat=aoolication%2Fjson.
(Reason: CORS header 'Access-Control-Allow-Origin' missing).
Solution was paste into \GeoServer 2.9.0\etc\webdefault.xml this:
When i got Geoserver instaled as application same code works in web.xml.