Tag Info

Hot answers tagged

8

You need a proxy if you are making an AJAX request to a machine and/or port that is different from the one that your webpage was served from. So in both your examples above you will need a proxy (on the server that is serving the webpage) if you want to make WMS getfeatureinfo requests or any sort of WFS request. However you do not need a proxy for simple ...


7

If you're using Ubuntu, you'll first have to configure Apache $sudo ln -s /etc/apache2/mods-available/proxy.conf /etc/apache2/mods-enabled/proxy.conf $sudo ln -s /etc/apache2/mods-available/proxy.load /etc/apache2/mods-enabled/proxy.load $sudo ln -s /etc/apache2/mods-available/proxy_http.load /etc/apache2/mods-enabled/proxy_http.load Then append the ...


6

The JS API makes extensive use of JSONP, and this is how service metadata is retrieved. Once the JS API knows about a map service, it can insert tags to display map tiles or images from dynamic map services. You're correct that there are certain cases where a proxy is required. You can read up about them in the "Using a Proxy" section of the Inside ...


5

to avoid the cross origin policy that prevents evil sites from stealing your credit card details by accident. See http://trac.osgeo.org/openlayers/wiki/FrequentlyAskedQuestions#WhydoIneedaProxyHost for more details.


4

With IIS I suggest to use this stuff, instead of configure CGI: http://code.google.com/p/iisproxy/issues/detail?id=8 Disclaimer: I suggest this simply because It's not so simple to use CGI&Python inside IIS.


4

You're reading too much into the "security concerns" comment. Basically he means you can't connect directly to the database, which is more true from a practicality point of view than from a security point of view. You're going to have something speaking HTTP between your web page and your database. It could be MapServer or GeoServer or FeatureServer. Or it ...


3

I had the same issues and increased the byte size, see http://geographika.co.uk/a-proxy-for-iis-and-net for links to modified code and details. Source in BitBucket at https://bitbucket.org/geographika/openlayers/src/tip/iisproxy/ Key change is: //updated to read gzip compressed streams correctly byte[] buffer = new byte[32768]; It also allows ...


3

I think you can meet your needs by using GeoServer with it's WMS datastore to ingest remote WMS services and GeoWebCache to handle tiling and caching on your machine. The cascading WMS layer will handle reprojection for you (if the remote server doesn't) and GeoWebCache will store the tiles as they are requested by your client (or you can pre-seed the ...


3

pls read here. Why do I need a ProxyHost? Due to security restrictions in Javascript, it is not possible to retrieve information from remote domains via an XMLHttpRequest. Classes like WFS and GeoRSS use XMLHTTPRequest to get their data. If they are querying a remote server (anything other than the machine hosting your page), you must install ...


3

When you want to make a XHR request to tomcat.capecodgis.com/geoserver from capecodgis.com, it will not be directly possible because this is a crossdomain request. Generally speaking in the case of crossdomain, resources such as images, JavaScript files etc can be requested across domains. But for JavaScript to make a request to a service is not allowed. ...


3

You can use GetFeatureInfo without proxy, when both your OpenLayers application and GeoServer live in same domain and same port. If they are in different location, you need proxy. Simple as that.


3

Yes a proxy is the way to go right now, since you need to put your API_KEY in the url to access to tiles from private tables (and you should not expose your API_KEY). The code is a bit outdated but it should work. FYI we are currently testing an implementation that allows you to have maps from private tables, this is the spec: ...


2

I just tested it and seems to be working although i didn't know such a thing existed :-) Here is what i did. Downloaded the gml schema from here..gml schema Extracted the zip In Visual Studio 2008, Created a blank project in c#. dragged the extracted files to this project using windows explorer. Right clicked a xsd file and clicked Run Xsd2Code.. Got the ...


2

If you want to use Server side C# proxy, then use you can try this proxy.ashx.net proxy


2

The OpenLayers FAQ has a section on setting up your own ProxyHost. Here's the relevant excerpt: How do I set up a ProxyHost? An example proxy host script is available here: trunk/openlayers/examples/proxy.cgi For the standard Apache configuration, you would place proxy.cgi into your /usr/lib/cgi-bin/ directory. Once a proxy host script ...


2

When JavaScript was first developed, it was not imagined that it would have such wide use, and hence many assumptions were made during its development, which have become problematic today. When Microsoft designed the XMLHttpRequest in their Internet Explorer Browser, it was designed with a big limitation. The XMLHttpRequest does not allow you to directly ...


2

In this case it is because your sample proxy script from Open Layers is written in Python. Changing the header line just changes the language that your cgi file tells the server that it's in. You either need to modify your apache server to run Python (see here for one method) or alternately download a Perl proxy and modify it for your purposes, for example ...


2

You do not need to configure proxypass and proxypassreverse. You will need a proxy.cgi file written in python, and python installed on your server. you can get the proxy file with the openlayers distribution in the example folder. you will have to configure the path to python interpreter in the 1st line, and add your host to list of allowed hosts.


2

sPlace your html files (and OpenLayers.js etc) in the www directory of your GeoServer data directory. You will not then need a proxy as your map page and WFS data will be coming from the same machine and port. For what you are doing there is no need to run Apache. The only other problem you may see is if you just double click on the html file in explorer ...


2

I assume that your Apache is on port 80 and your Geoserver is on the same machine on port 8080. I would suggest that you set up a reverse proxy on your Apache server. On my server I have set up Apache to resolve http://example.com/geoserver to http://example.com:8080/ That way I can just use the wms link as http://example.com/geoserver/wms & I don't ...


2

Try using the Cadcorp.OGC.CGI.exe (which you can just rename to, for example, wfs.exe) instead of your proxy.asp. It is configured via a companion INI file, and passes on everything that GeognoSIS needs. Or, you could use WMS GetFeatureInfo instead of WFS, for a simplified response


2

MapProxy supports WMS sources (1.0.0–1.3.0)& TMS/WMTS sources. Google does not have an WMS service. It has its own tiles, and according to Google's Terms & Conditions, you are allowed to access the tiles only through their API. This is why you cannot use MapProxy with Google Maps as a source.


2

Technically it is very simple to use Google tiles as source for WMS. You can do this with the following MapProxy config: services: demo: tms: wms: md: title: MapProxy WMS Server sources: gm: type: tile url: http://mt0.google.com/vt/lyrs=m@0&hl=en&x=%(x)s&y=%(y)s&z=%(z)s grid: gm_grid grids: gm_grid: ...


2

I don't think this is possible in a purely technical sense. If your user has access to the client, then there will be a way that they can work around the protection, even if it relies on a browser automation technology. Its always helpful to rethink what you are trying to protect, and what you are trying to protect it from (sometimes called the threat ...


2

My comment was half truthful. Every request that you allow your JavaScript App to make, I can make them too. You have to be a little bit smart about it. So, securing your ArcGIS Server is possible, it's only a matter of how much work you are willing to do. I used to work for a Government client, that had a similar request. I tried to reason with them, but ...


2

No, A JavaScript App on another Domain can't use your proxy directly. You need to understand that JavaScript has a major limitation. It can't directly access resources (excluding images) from another domain. This is generally why a proxy is used inthe first place; to access the resources from an ArcGIS server or other services which are on another domain. ...


2

i can't find a link to share right now, but as of 10.1 the self contained installation of ArcGIS Server which is typically accessible on port 6080 is CORS enabled by default (the installation also gives you the option of laying down crossdomain and clientaccesspolicy.xml files to support the same in Flex and Silverlight). if you install the web adaptor on ...


1

You need a PHP proxy. This is a simple proxy.php script. It will be completely open, and you might want to lock it down. <?php $ch = curl_init($_GET['url']); curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); $output = curl_exec($ch); curl_close($ch); echo $output; ?> In your OpenLayers JavaScript config point to ...


1

A 500 error indicates that the server is having problems. This tells me that the proxy is not configured properly. To solve the issue, I would check the following: Are you on a Linux/Unix Machine? The path #!/usr/bin/env python.exe -u; is usually for linux systems. My proxy file on a windows machine has the following as the first line: ...


1

solved the problem using proxy.php. I got the file from the last Mapbuilder app, and its just copy the proxy.php file in my /var/www/ directory. In openlayers edit/add the line OpenLayers.ProxyHost = "/proxy.php?url=" http://lists.osgeo.org/pipermail/openlayers-users/2011-March/019840.html response to comment: To setup the proxy see Geoserver ...



Only top voted, non community-wiki answers of a minimum length are eligible