feat: handle the X-Forwarded-Path header

This commit is contained in:
Zsolt Jakubinyi 2024-03-01 13:38:06 +04:00 committed by Andrew Calcutt
parent 366f71ca44
commit 549e175164

View file

@ -114,9 +114,10 @@ export const getTileUrls = (
const uris = [];
if (!publicUrl) {
let xForwardedPath = `${req.get('X-Forwarded-Path') ? "/" + req.get('X-Forwarded-Path') : ""}`
for (const domain of domains) {
uris.push(
`${req.protocol}://${domain}/${path}/${tileParams}.${format}${query}`,
`${req.protocol}://${domain}${xForwardedPath}/${path}/${tileParams}.${format}${query}`,
);
}
} else {