[OpenLayers-Users] Setting / Configuring proxy
in Openlayers/JavaScript
JobvdSande
job.vandesande at atosorigin.com
Wed Jan 27 05:28:13 EST 2010
Hi Marc,
Thank you for your reply. I know indeed that this is one way of setting up a
proxy in OpenLayers, to avoid the same origin policy (or something, not sure
atm).
The problem actuality is, we have a proxy running on eq localhost:8081, this
proxy will rap the request into a soap message. That's why i want also
openlayers to use this proxy.
One other way, what is not working, is to set IE to this very same proxy,
but then our proxy crashes because every request made by any windows
application is routed trough our proxy, was of course, is not its
intention..
Hopefully it is posible to do this either in openlayers or javascript.
Marc Jansen-2 wrote:
>
> Hi Job,
>
> AFAIK the proxy set up using e.g.
>
> OpenLayers.ProxyHost = "/cgi-bin/proxy.cgi?url=";
>
> Will be used for every AJAX request. Since WMS-Images aren't (usually)
> requested via XHR, these do not use the proxy. You could try to set the
> baseURL of your WMS-Layer to point to the proxy, though:
>
> OpenLayers.ProxyHost = "/cgi-bin/proxy.cgi?url=";
> var myWMSLayer = new OpenLayers.Layer.WMS(
> "WMS Name",
> OpenLayers.ProxyHost + 'http://www.example.com/wmsserver?',
> {
> layers: 'humpty'
> }
> );
>
>
> That *could* work (it's untested)
>
> Regards,
> Marc
>
>
> van de Sande, Job wrote:
>>
>> Hello,
>>
>> I was wondering if it was possible to set a proxy when using
>> OpenLayers. I know that, openlayer.ProxyHost can be used to point to a
>> cgi file. This will solve the problem when accessing data on the same
>> server.
>>
>> The thing is, i want to use a proxy server when connecting to a
>> WMS/WFS server from openLayers. It's not possible to use the proxy
>> settings from IE.
>>
>> So, any body knows a way to set a proxy server that only openlayers
>> will use, eq _http://localhost:8081_ as proxy server for openLayers.
>>
>> Met vriendelijke groeten / With kind regards,
>>
>> Job van de Sande
>>
>>
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> Users mailing list
>> Users at openlayers.org
>> http://openlayers.org/mailman/listinfo/users
>
>
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users
>
>
--
View this message in context: http://n2.nabble.com/Setting-Configuring-proxy-in-Openlayers-JavaScript-tp4465596p4466358.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
More information about the Users
mailing list