feat: handle the X-Forwarded-Path header
This commit is contained in:
parent
366f71ca44
commit
549e175164
1 changed files with 67 additions and 66 deletions
|
@ -114,9 +114,10 @@ export const getTileUrls = (
|
||||||
|
|
||||||
const uris = [];
|
const uris = [];
|
||||||
if (!publicUrl) {
|
if (!publicUrl) {
|
||||||
|
let xForwardedPath = `${req.get('X-Forwarded-Path') ? "/" + req.get('X-Forwarded-Path') : ""}`
|
||||||
for (const domain of domains) {
|
for (const domain of domains) {
|
||||||
uris.push(
|
uris.push(
|
||||||
`${req.protocol}://${domain}/${path}/${tileParams}.${format}${query}`,
|
`${req.protocol}://${domain}${xForwardedPath}/${path}/${tileParams}.${format}${query}`,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue