diff --git a/web-ui/src/main/resources/catalog/components/common/map/mapService.js b/web-ui/src/main/resources/catalog/components/common/map/mapService.js index d1c7f139099..48c18557512 100644 --- a/web-ui/src/main/resources/catalog/components/common/map/mapService.js +++ b/web-ui/src/main/resources/catalog/components/common/map/mapService.js @@ -895,7 +895,7 @@ }; var loadFunction = function (imageTile, src) { - $http.head(src, { nointercept: true }).then( + $http.head(src).then( function (r) { imageTile.getImage().src = src; }, @@ -1660,7 +1660,7 @@ var _url = url.split("/"); _url = _url[0] + "/" + _url[1] + "/" + _url[2] + "/"; if ( - $.inArray(_url, gnGlobalSettings.requireProxy) >= 0 && + $.inArray(_url + "#GET", gnGlobalSettings.requireProxy) >= 0 && url.indexOf(gnGlobalSettings.proxyUrl) != 0 ) { capL.useProxy = true; diff --git a/web-ui/src/main/resources/catalog/components/utility/CORSInterceptor.js b/web-ui/src/main/resources/catalog/components/utility/CORSInterceptor.js index 8b424b70f45..2729b21050b 100644 --- a/web-ui/src/main/resources/catalog/components/utility/CORSInterceptor.js +++ b/web-ui/src/main/resources/catalog/components/utility/CORSInterceptor.js @@ -81,10 +81,15 @@ if (mapservice !== null) { if (mapservice.useProxy) { // If we need to use the proxy then add it to requireProxy list. - if ($.inArray(config.url, gnGlobalSettings.requireProxy) === -1) { + if ( + $.inArray( + config.url + "#" + config.method, + gnGlobalSettings.requireProxy + ) === -1 + ) { var url = config.url.split("/"); url = url[0] + "/" + url[1] + "/" + url[2] + "/"; - gnGlobalSettings.requireProxy.push(url); + gnGlobalSettings.requireProxy.push(url + "#" + config.method); } } else { // If we are not using a proxy then add the headers. @@ -113,7 +118,10 @@ var url = config.url.split("/"); url = url[0] + "/" + url[1] + "/" + url[2] + "/"; - if ($.inArray(url, gnGlobalSettings.requireProxy) !== -1) { + if ( + $.inArray(url + "#" + config.method, gnGlobalSettings.requireProxy) !== + -1 + ) { // require proxy config.url = gnGlobalSettings.proxyUrl + encodeURIComponent(config.url); } @@ -156,8 +164,13 @@ var url = config.url.split("/"); url = url[0] + "/" + url[1] + "/" + url[2] + "/"; - if ($.inArray(url, gnGlobalSettings.requireProxy) === -1) { - gnGlobalSettings.requireProxy.push(url); + if ( + $.inArray( + url + "#" + config.method, + gnGlobalSettings.requireProxy + ) === -1 + ) { + gnGlobalSettings.requireProxy.push(url + "#" + config.method); } $injector.invoke([ diff --git a/web-ui/src/main/resources/catalog/components/viewer/wmsimport/WmsImportDirective.js b/web-ui/src/main/resources/catalog/components/viewer/wmsimport/WmsImportDirective.js index f3bb806c7cf..bdc1eb1f285 100644 --- a/web-ui/src/main/resources/catalog/components/viewer/wmsimport/WmsImportDirective.js +++ b/web-ui/src/main/resources/catalog/components/viewer/wmsimport/WmsImportDirective.js @@ -87,7 +87,7 @@ var url = $scope.url.split("/"); getCapLayer.useProxy = false; url = url[0] + "/" + url[1] + "/" + url[2] + "/"; - if ($.inArray(url, gnGlobalSettings.requireProxy) >= 0) { + if ($.inArray(url + "#GET", gnGlobalSettings.requireProxy) >= 0) { getCapLayer.useProxy = true; } if ($scope.format == "wms") {