mirror of
https://github.com/protomaps/PMTiles.git
synced 2026-02-04 10:51:07 +00:00
allow both pbf and mvt extensions for vector tiles for now. In the future, pbf option will be removed.
This commit is contained in:
@@ -170,6 +170,10 @@ export const handler = async (
|
|||||||
[TileType.Webp, "webp"],
|
[TileType.Webp, "webp"],
|
||||||
]) {
|
]) {
|
||||||
if (header.tileType === pair[0] && ext !== pair[1]) {
|
if (header.tileType === pair[0] && ext !== pair[1]) {
|
||||||
|
if (header.tileType == TileType.Mvt && ext === "pbf") {
|
||||||
|
// allow this for now. Eventually we will delete this in favor of .mvt
|
||||||
|
continue;
|
||||||
|
}
|
||||||
return apiResp(
|
return apiResp(
|
||||||
400,
|
400,
|
||||||
"Bad request: archive has type ." + pair[1],
|
"Bad request: archive has type ." + pair[1],
|
||||||
|
|||||||
@@ -187,6 +187,10 @@ export default {
|
|||||||
[TileType.Webp, "webp"],
|
[TileType.Webp, "webp"],
|
||||||
]) {
|
]) {
|
||||||
if (p_header.tileType === pair[0] && ext !== pair[1]) {
|
if (p_header.tileType === pair[0] && ext !== pair[1]) {
|
||||||
|
if (p_header.tileType == TileType.Mvt && ext === "pbf") {
|
||||||
|
// allow this for now. Eventually we will delete this in favor of .mvt
|
||||||
|
continue;
|
||||||
|
}
|
||||||
return cacheableResponse(
|
return cacheableResponse(
|
||||||
"Bad request: archive has type ." + pair[1],
|
"Bad request: archive has type ." + pair[1],
|
||||||
cacheable_headers,
|
cacheable_headers,
|
||||||
|
|||||||
Reference in New Issue
Block a user