[OpenLayers-Dev] WFS without proxy

Andreas Hocevar ahocevar at opengeo.org
Tue Nov 30 05:45:15 EST 2010


Hi Steven,

for this to work, your server has to provide the correct response to the OPTIONS request that the browser sends to determine whether the server allows cross-domain access. OpenLayers is not involved in this OPTIONS request.

At this points, I am not aware of any WFS that supports HTTP access control.

If you are able to proxy the WFS in questions through your httpd, you can either bring your WFS to your web site's domain [1], or configure the httpd to send the HTTP access control response.

Regards,
Andreas.

[1] http://geoserver.org/display/GEOSDOC/How+to+proxy+Jetty+through+Apache+on+port+80

On Nov 30, 2010, at 10:04 , Steven M. Ottens wrote:

> Hi all,
> 
> I'm trying to get WFS POST-requests working in openlayers without a proxy. (The reason for that is that I want to get shiboleth authentication working, which doesn't allow for proxies). There is a new feature introduced in firefox and other modern browsers which should allow for cross-site XHRequests (https://developer.mozilla.org/en/HTTP_access_control).
> 
> However when I remove the proxy from the configuration openlayers does an HTTP OPTIONS request to the WFS server, instead of a POST request. I'm at a loss why this is, I've put a breakpoint in /lib/openlayers/Request.js at the OPTIONS function, but it is never called and nowhere else in openlayers code there is a mention of OPTIONS requests.
> 
> Has anyone tried (and succeeded) to use openlayers and POST requests without a proxy and/or know why there is a OPTIONS request?
> 
> regards,
> Steven
> 
> _______________________________________________
> Dev mailing list
> Dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/openlayers-dev



-- 
Andreas Hocevar
OpenGeo - http://opengeo.org/
Expert service straight from the developers.



More information about the Dev mailing list