Fix url instrumentation when serving style to be more robust (close #108)
This commit is contained in:
@@ -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);
|
||||||
|
|||||||
Reference in New Issue
Block a user