supporting x-forwarded-host in getPublicUrl
This commit is contained in:
parent
aba60f0c6a
commit
521f1ab371
1 changed files with 1 additions and 1 deletions
|
|
@ -7,7 +7,7 @@ const clone = require('clone');
|
||||||
const glyphCompose = require('@mapbox/glyph-pbf-composite');
|
const glyphCompose = require('@mapbox/glyph-pbf-composite');
|
||||||
|
|
||||||
|
|
||||||
module.exports.getPublicUrl = (publicUrl, req) => publicUrl || `${req.protocol}://${req.headers.host}/`;
|
module.exports.getPublicUrl = (publicUrl, req) => publicUrl || (req.headers.x-forwarded-host ? `${req.headers.x-forwarded-proto || req.protocol}://${req.headers.x-forwarded-host}/` : `${req.protocol}://${req.headers.host}/`);
|
||||||
|
|
||||||
module.exports.getTileUrls = (req, domains, path, format, publicUrl, aliases) => {
|
module.exports.getTileUrls = (req, domains, path, format, publicUrl, aliases) => {
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue