Fix url instrumentation when serving style to be more robust (close #108)

This commit is contained in:
Petr Sloup 2017-01-23 12:58:47 +01:00
parent f14d8b1e57
commit 4992bc4194

View file

@ -60,6 +60,9 @@ module.exports = function(options, repo, params, id, reportTiles, reportFont) {
app.get('/' + id + '.json', function(req, res, next) {
var fixUrl = function(url, opt_nokey, opt_nostyle) {
if (!url || (typeof url !== 'string') || url.indexOf('local://' !== 0)) {
return url;
}
var queryParams = [];
if (!opt_nostyle) {
queryParams.push('style=' + id);