[Mapbender-commits] r9142 - trunk/mapbender/owsproxy/http
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Thu Jan 8 01:04:03 PST 2015
Author: armin11
Date: 2015-01-08 01:04:03 -0800 (Thu, 08 Jan 2015)
New Revision: 9142
Modified:
trunk/mapbender/owsproxy/http/index.php
Log:
Possibility to exclude urls from the owsproxy in case of featureinfo requests. Sometimes there are problems with redirects and headers, and not all urls should be replaced.
Modified: trunk/mapbender/owsproxy/http/index.php
===================================================================
--- trunk/mapbender/owsproxy/http/index.php 2015-01-08 09:03:50 UTC (rev 9141)
+++ trunk/mapbender/owsproxy/http/index.php 2015-01-08 09:04:03 UTC (rev 9142)
@@ -24,6 +24,11 @@
require_once(dirname(__FILE__) . "/../../http/classes/class_connector.php");
require_once(dirname(__FILE__) . "/../../http/classes/class_mb_exception.php");
require_once(dirname(__FILE__) . "/./classes/class_QueryHandler.php");
+$urlsToExclude = array();
+if (is_file(dirname(__FILE__) . "/../../conf/excludeproxyurls.conf"))
+{
+ require_once(dirname(__FILE__) . "/../../conf/excludeproxyurls.conf");
+}
/* * *** conf **** */
$imageformats = array("image/png", "image/gif", "image/jpeg", "image/jpg");
$width = 400;
@@ -554,6 +559,7 @@
function matchUrls($content)
{
+ global $urlsToExclude;
//check if isset owsproxyUrls else create
$owsproxyUrls = Mapbender::session()->get('owsproxyUrls');
if ($owsproxyUrls == false) {
@@ -568,7 +574,10 @@
for ($i = 0; $i < count($matches[1]); $i++) {
$req = $matches[1][$i];
$notice = new mb_notice("owsproxy found URL " . $i . ": " . $req);
- #$notice = new mb_exception("owsproxy id:".$req);
+ //only register and exchange urls, that should not be excluded!
+ if (in_array($req,$urlsToExclude)) {
+ continue;
+ }
$id = registerURL($req);
$extReq = setExternalRequest($id);
$notice = new mb_notice("MD5 URL " . $id . " - external link: " . $extReq);
More information about the Mapbender_commits
mailing list