[OpenLayers-Users] Using Proxy Host?

Ryan Williams rwilliams at paqinteractive.com
Tue Jun 1 14:28:16 EDT 2010


Sorry everyone, that should have gone to the users at geoserver.org instead 
of @openlayers....
Thanks for you're response though, it is helpful

Ryan

On 6/1/2010 1:17 PM, christopher.schmidt at nokia.com wrote:
> On Jun 1, 2010, at 2:08 PM, ext Ryan Williams wrote:
>
>    
>> Hi all,
>>
>> I know similar questions have been asked, but after searching for most
>> of the morning I have yet to find an answer that I can get to work.
>>
>> I'm trying to make this work: Geoserver 2.0-SNAPSHOT is on one server
>> with it's own domain; Our web server is on a different server in a
>> different domain.
>> My page is html with OpenLayers 2.9 and other JavaScript and it is
>> served up by the web server (call it dev.mapping.com/maps.html).
>> I'm able to display map images and legends from Geoserver and
>> GeoWebCache, but when I attempt a WMS GetFeatureInfo request I receive a
>> blank popup and firefox reports: "401 Full Authentication is required to
>> access this resource"
>>
>> Now, I think this is due to the 'Same Origin Policy' and I may be able
>> to setup a proxy to get around this.
>>      
> This is incorrect. A 401 error is not issued because of a Same Origin Policy
> violation. Instead, the request will simply not work/cause an error.
>
> Possibly, this is happening because the relative resource to dev.mapping.com
> is actually protected: If you're requesting "/foo/wms/bar", and the URL
> on dev.mapping.com is protected by some kind of auth, that could be your
> problem, but without seeing your code I can't really imagine how this would
> be without you knowing it.
>
>    
>> So, is this a situation where adding "dev.mapping.com" to the permitted
>> hostnames in the Geoserver Proxy Administration UI should make this work?
>>      
> Generally, GeoServer would only be able to proxy requests *out* from
> geoserver.example.com -- not requests from remote.example.com *to*
> geoserver.example.com. So unless something special is going on here that
> I can't picture, I don' think so.
>
>    
>> Do I need to be setting the OpenLayers.ProxyHost variable?
>>      
> Probably.
>
>    
>> (I realize
>> this is an OpenLayers question)
>> Is this something that needs to be setup on the web server instead?
>>      
> The web server that is serving your HTML pages, yes.
>
>    
>> I've tried adding the hostname to the permitted hostnames in the
>> Geoserver UI and haven't seen any changes. Am I completely
>> misunderstanding what this proxy config is for?
>>      
> I have never used GeoServer, but I think the answer is still yes.
>
> Regards,
>    

-- 
Ryan Williams, GISP
GIS Analyst / Programmer
PAQ Interactive Inc.
107 S State St., Suite 300
Monticello, IL 61856-1968
Office: (217) 762-7955
Mobile: (217) 722-2794
rwilliams at paqinteractive.com




More information about the Users mailing list