[OpenLayers-Users] Access to restricted URI denied" code:
"1012" when added WFS
Sasky
sassymaus at gmx.net
Thu Sep 24 07:33:19 EDT 2009
I have a file called proxy.cgi and changed the hosts:
allowedHosts = ['localhost:5000', 'www.openlayers.org', 'openlayers.org',
'labs.metacarta.com', 'world.freemap.in',
'prototype.openmnnd.org', 'geo.openplans.org',
'sigma.openplans.org', 'demo.opengeo.org',
'www.openstreetmap.org', 'sample.avencia.com]
I also have a file mapfish_proxy.js containing the following code:
OpenLayers.ProxyHost = "/cgi-bin/proxy.cgi?url=";
mapfish.SERVER_BASE_URL = '';
But it still does not work, FireBug still throws the same exeptions.
Do I have to change more than 'allowedHosts'?
(Sorry I'm a newbie)
Thanks a lot.
iweinzierl wrote:
>
> Hi Sasky,
>
> the WFS layer uses the XMLHttpRequest object to fetch its data. If you try
> to
> request the data from a remote host, you get into the problem of the Same
> Origin Policy [1], which denies loading data from remote hosts. To avoid
> this, you will need to set up a proxy on the host your site is running on
> (
> see [2]). I hope this helps.
>
> [1] http://en.wikipedia.org/wiki/Same_origin_policy
> [2] http://trac.openlayers.org/wiki/FrequentlyAskedQuestions#ProxyHost
>
> Regards, Ingo
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users
>
>
--
View this message in context: http://n2.nabble.com/Access-to-restricted-URI-denied-code-1012-when-added-WFS-tp3704885p3705587.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
More information about the Users
mailing list