Skip to content

Commit

Permalink
Fixed Issue maptiler#1025 - URL-based glyphs and fonts break displayi…
Browse files Browse the repository at this point in the history
…ng of vector tiles

Root cause: modified regex in maptiler#1002 caused URLs to be broken.
Fixed by reverting previous regexes.

Tests:
 * Confirmed by building and running locally with formerly breaking config.json and style json.
 * Run tests via Dockerfile_test
  • Loading branch information
alex-kowalczyk committed Oct 20, 2023
1 parent 471dd15 commit 0fc8ed8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/serve_rendered.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import {
const FLOAT_PATTERN = '[+-]?(?:\\d+|\\d+.?\\d+)';
const PATH_PATTERN =
/^((fill|stroke|width)\:[^\|]+\|)*(enc:.+|-?\d+(\.\d*)?,-?\d+(\.\d*)?(\|-?\d+(\.\d*)?,-?\d+(\.\d*)?)+)/;
const httpTester = /^\/\//;
const httpTester = /^(http(s)?:)?\/\//;

const mercator = new SphericalMercator();
const getScale = (scale) => (scale || '@1x').slice(1, 2) | 0;
Expand Down
2 changes: 1 addition & 1 deletion src/serve_style.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { validate } from '@maplibre/maplibre-gl-style-spec';

import { getPublicUrl } from './utils.js';

const httpTester = /^\/\//;
const httpTester = /^(http(s)?:)?\/\//;

const fixUrl = (req, url, publicUrl, opt_nokey) => {
if (!url || typeof url !== 'string' || url.indexOf('local://') !== 0) {
Expand Down

0 comments on commit 0fc8ed8

Please sign in to comment.