| | |
| | | url = strs[0]; |
| | | |
| | | if (!StringHelper.isEmpty(strs[1])) { |
| | | str = str.replace("?" + strs[1], ""); |
| | | str = str.replace("?" + strs[1], "").replace("&" + strs[1], "").replace("&" + strs[1], ""); |
| | | } |
| | | } |
| | | if (str.contains(url)) { |
| | | String proxyUrl = res.getProxy().replace("{token}", response.getHeader("token")); |
| | | proxyUrl = request.getRequestURL().substring(0, request.getRequestURL().indexOf(proxyUrl) + proxyUrl.length()); |
| | | str = str.replace(res.getUrl(), proxyUrl); |
| | | str = str.replace(url, proxyUrl); |
| | | |
| | | if (str.contains(StaticData.REST_LAYER)) { |
| | | str = str.replace(url.replace("/wmts/layer/", StaticData.REST_LAYER), proxyUrl); |
| | | } |
| | | } |
| | | |
| | | return str; |