codeql
This commit is contained in:
parent
59f4dccb07
commit
aa936eaef4
2 changed files with 18 additions and 9 deletions
|
@ -47,7 +47,12 @@ export const serve_data = {
|
||||||
app.get('/:id/:z/:x/:y.:format', async (req, res) => {
|
app.get('/:id/:z/:x/:y.:format', async (req, res) => {
|
||||||
if (verbose) {
|
if (verbose) {
|
||||||
console.log(
|
console.log(
|
||||||
`Handling tile request for: /data/${req.params.id}/${req.params.z}/${req.params.x}/${req.params.y}.${req.params.format}`,
|
`Handling tile request for: /data/%s/%s/%s/%s.%s`,
|
||||||
|
String(id).replace(/\n|\r/g, ''),
|
||||||
|
String(z).replace(/\n|\r/g, ''),
|
||||||
|
String(x).replace(/\n|\r/g, ''),
|
||||||
|
String(y).replace(/\n|\r/g, ''),
|
||||||
|
String(format).replace(/\n|\r/g, ''),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
const item = repo[req.params.id];
|
const item = repo[req.params.id];
|
||||||
|
|
|
@ -962,13 +962,13 @@ export const serve_rendered = {
|
||||||
console.log(
|
console.log(
|
||||||
`Handling rendered %s request for: /styles/%s%s/%s/%s/%s%s.%s`,
|
`Handling rendered %s request for: /styles/%s%s/%s/%s/%s%s.%s`,
|
||||||
requestType,
|
requestType,
|
||||||
id,
|
String(id).replace(/\n|\r/g, ''),
|
||||||
p1 ? '/' + p1 : '',
|
p1 ? '/' + String(p1).replace(/\n|\r/g, '') : '',
|
||||||
p2,
|
String(p2).replace(/\n|\r/g, ''),
|
||||||
p3,
|
String(p3).replace(/\n|\r/g, ''),
|
||||||
p4,
|
String(p4).replace(/\n|\r/g, ''),
|
||||||
scale ? '@' + scale : '',
|
scale ? '@' + String(scale).replace(/\n|\r/g, '') : '',
|
||||||
format,
|
String(format).replace(/\n|\r/g, ''),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1019,7 +1019,11 @@ export const serve_rendered = {
|
||||||
const tileSize = parseInt(req.params.tileSize, 10) || undefined;
|
const tileSize = parseInt(req.params.tileSize, 10) || undefined;
|
||||||
if (verbose) {
|
if (verbose) {
|
||||||
console.log(
|
console.log(
|
||||||
`Handling rendered tilejson request for: /styles/${tileSize ? tileSize + '/' : ''}${req.params.id}.json`,
|
`Handling rendered tilejson request for: /styles/%s%s.json`,
|
||||||
|
req.params.tileSize
|
||||||
|
? String(req.params.tileSize).replace(/\n|\r/g, '') + '/'
|
||||||
|
: '',
|
||||||
|
String(req.params.id).replace(/\n|\r/g, ''),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
const info = clone(item.tileJSON);
|
const info = clone(item.tileJSON);
|
||||||
|
|
Loading…
Reference in a new issue