Fix url instrumentation when serving style to be more robust (close #108)
This commit is contained in:
parent
f14d8b1e57
commit
4992bc4194
1 changed files with 3 additions and 0 deletions
|
@ -60,6 +60,9 @@ module.exports = function(options, repo, params, id, reportTiles, reportFont) {
|
||||||
|
|
||||||
app.get('/' + id + '.json', function(req, res, next) {
|
app.get('/' + id + '.json', function(req, res, next) {
|
||||||
var fixUrl = function(url, opt_nokey, opt_nostyle) {
|
var fixUrl = function(url, opt_nokey, opt_nostyle) {
|
||||||
|
if (!url || (typeof url !== 'string') || url.indexOf('local://' !== 0)) {
|
||||||
|
return url;
|
||||||
|
}
|
||||||
var queryParams = [];
|
var queryParams = [];
|
||||||
if (!opt_nostyle) {
|
if (!opt_nostyle) {
|
||||||
queryParams.push('style=' + id);
|
queryParams.push('style=' + id);
|
||||||
|
|
Loading…
Reference in a new issue