Skip to content

Commit

Permalink
fixed proxyUrl in Cesium Layers, add demo to cors (#1815)
Browse files Browse the repository at this point in the history
  • Loading branch information
offtherailz authored May 12, 2017
1 parent fb25843 commit 4ce1460
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ TileProviderProxy.prototype.getURL = function(resource) {
if (url.indexOf("//") === 0) {
url = location.protocol + url;
}
return this.proxy.url + encodeURIComponent(url + queryString);
return ProxyUtils.getProxyUrl() + encodeURIComponent(url + queryString);
};

function NoProxy() {
Expand Down
2 changes: 1 addition & 1 deletion web/client/components/map/cesium/plugins/WMSLayer.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ function WMSProxy(proxy) {

WMSProxy.prototype.getURL = function(resource) {
let {url, queryString} = splitUrl(resource);
return this.proxy.url + encodeURIComponent(url + queryString);
return ProxyUtils.getProxyUrl() + encodeURIComponent(url + queryString);
};

function NoProxy() {
Expand Down
2 changes: 1 addition & 1 deletion web/client/components/map/cesium/plugins/WMTSLayer.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ const isValidTile = (tileMatrixSet) => (x, y, level) =>

WMTSProxy.prototype.getURL = function(resource) {
let {url, queryString} = splitUrl(resource);
return this.proxy + encodeURIComponent(url + queryString);
return ProxyUtils.getProxyUrl() + encodeURIComponent(url + queryString);
};

function NoProxy() {
Expand Down
2 changes: 1 addition & 1 deletion web/client/localConfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

"proxyUrl": {
"url": "/mapstore/proxy/?url=",
"useCORS": ["https://demo.geo-solutions.it/geoserver"]
"useCORS": ["http://demo.geo-solutions.it/geoserver", "https://demo.geo-solutions.it/geoserver"]
},
"geoStoreUrl": "/mapstore/rest/geostore/",
"printUrl": "https://demo.geo-solutions.it/geoserver/pdf/info.json",
Expand Down

0 comments on commit 4ce1460

Please sign in to comment.