Minor bugfix: make baseUrl always use '/' in the end
This commit is contained in:
parent
2d9e2f7f4e
commit
ac7707294c
2 changed files with 5 additions and 5 deletions
|
|
@ -11,7 +11,7 @@
|
||||||
<ows:Operation name="GetCapabilities">
|
<ows:Operation name="GetCapabilities">
|
||||||
<ows:DCP>
|
<ows:DCP>
|
||||||
<ows:HTTP>
|
<ows:HTTP>
|
||||||
<ows:Get xlink:href="{{baseUrl}}/wmts/{{id}}/">
|
<ows:Get xlink:href="{{baseUrl}}wmts/{{id}}/">
|
||||||
<ows:Constraint name="GetEncoding">
|
<ows:Constraint name="GetEncoding">
|
||||||
<ows:AllowedValues>
|
<ows:AllowedValues>
|
||||||
<ows:Value>RESTful</ows:Value>
|
<ows:Value>RESTful</ows:Value>
|
||||||
|
|
@ -24,7 +24,7 @@
|
||||||
<ows:Operation name="GetTile">
|
<ows:Operation name="GetTile">
|
||||||
<ows:DCP>
|
<ows:DCP>
|
||||||
<ows:HTTP>
|
<ows:HTTP>
|
||||||
<ows:Get xlink:href="{{baseUrl}}/styles/">
|
<ows:Get xlink:href="{{baseUrl}}styles/">
|
||||||
<ows:Constraint name="GetEncoding">
|
<ows:Constraint name="GetEncoding">
|
||||||
<ows:AllowedValues>
|
<ows:AllowedValues>
|
||||||
<ows:Value>RESTful</ows:Value>
|
<ows:Value>RESTful</ows:Value>
|
||||||
|
|
@ -50,7 +50,7 @@
|
||||||
<TileMatrixSetLink>
|
<TileMatrixSetLink>
|
||||||
<TileMatrixSet>GoogleMapsCompatible</TileMatrixSet>
|
<TileMatrixSet>GoogleMapsCompatible</TileMatrixSet>
|
||||||
</TileMatrixSetLink>
|
</TileMatrixSetLink>
|
||||||
<ResourceURL format="image/png" resourceType="tile" template="{{baseUrl}}/styles/{{id}}/{TileMatrix}/{TileCol}/{TileRow}.png{{key_query}}"/>
|
<ResourceURL format="image/png" resourceType="tile" template="{{baseUrl}}styles/{{id}}/{TileMatrix}/{TileCol}/{TileRow}.png{{key_query}}"/>
|
||||||
</Layer><TileMatrixSet>
|
</Layer><TileMatrixSet>
|
||||||
<ows:Title>GoogleMapsCompatible</ows:Title>
|
<ows:Title>GoogleMapsCompatible</ows:Title>
|
||||||
<ows:Abstract>GoogleMapsCompatible EPSG:3857</ows:Abstract>
|
<ows:Abstract>GoogleMapsCompatible EPSG:3857</ows:Abstract>
|
||||||
|
|
@ -403,5 +403,5 @@
|
||||||
<MatrixHeight>262144</MatrixHeight>
|
<MatrixHeight>262144</MatrixHeight>
|
||||||
</TileMatrix></TileMatrixSet>
|
</TileMatrix></TileMatrixSet>
|
||||||
</Contents>
|
</Contents>
|
||||||
<ServiceMetadataURL xlink:href="{{baseUrl}}/wmts/{{id}}/"/>
|
<ServiceMetadataURL xlink:href="{{baseUrl}}wmts/{{id}}/"/>
|
||||||
</Capabilities>
|
</Capabilities>
|
||||||
|
|
|
||||||
|
|
@ -423,7 +423,7 @@ function start(opts) {
|
||||||
wmts.baseUrl = opts.publicUrl;
|
wmts.baseUrl = opts.publicUrl;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
wmts.baseUrl = `${req.get('X-Forwarded-Protocol') ? req.get('X-Forwarded-Protocol') : req.protocol}://${req.get('host')}`;
|
wmts.baseUrl = `${req.get('X-Forwarded-Protocol') ? req.get('X-Forwarded-Protocol') : req.protocol}://${req.get('host')}/`;
|
||||||
}
|
}
|
||||||
return wmts;
|
return wmts;
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue