[OpenLayers-Users] Accessing Secure GeoServer Layers and ProxyHost

Jerome A. Wendell jawendell at suddenlink.net
Thu Aug 29 07:48:52 PDT 2013


(I apologize if this gets posted twice.  The first time I sent it with the
wrong email address.)

 

I am using OpenLayers Version 2.12 and GeoServer Version 2.2.4.  I have two
issues that I am trying to understand.  The first issue is concerning the
ProxyHost.  If I understand the documentation
<http://trac.osgeo.org/openlayers/wiki/FrequentlyAskedQuestions#ProxyHost>
correctly, I don't need to use a ProxyHost because my pages are being hosted
by the same server that GeoServer is running on.  I can access the data fine
without using a ProxyHost, but I have a select control using
OpenLayers.Control.WMSGetFeatureInfo that will not function without using
the ProxyHost (I have it setup just as described in the documentation).

 

The second issue is concerning accessing secured layers in GeoServer.  I was
able to access a secured layer using HTTP basic authentication as Andreas
described in the following post:

 

http://osgeo-org.1560.x6.nabble.com/Load-GeoServer-WMS-secured-layers-with-O
penLayers-td3919938.html

 

But I am having problems accessing the secured layer in the same way using
WMSGetFeatureInfo.  When I use a ProxyHost and try to use the select control
using WMSGetFeatureInfo, I get the following error in Firebug:
"NetworkError: 502 Bad Gateway".  Without the ProxyHost I get the following
error:  "NS_ERROR_DOM_BAD_URI: Access to restricted URI denied".  Evidently
the authentication has to be handled differently when using
WMSGetFeatureInfo.

 

I have done a lot of searching on the web for answers to both of these
issues, and so far have not found a solution.  Before I started trying to
access the secure layer, I just went ahead and used a ProxyHost and
everything works fine.  When I started trying to access the secure layer and
ran into the problems described, I started questioning whether or not I even
needed the ProxyHost.

 

If someone could point me in the right direction on these issues, I would
really appreciate it.

 

Thanks,

 

Jerome Wendell

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/openlayers-users/attachments/20130829/193adc6e/attachment.html>


More information about the Users mailing list