Skip to content

Commit

Permalink
update tilePattern and metadataPattern to allow leading (and ignorabl…
Browse files Browse the repository at this point in the history
…e) prefixes
  • Loading branch information
whosonfirst committed Oct 12, 2022
1 parent 84e7b97 commit ece5bbc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pmtiles/loop.go
Original file line number Diff line number Diff line change
Expand Up @@ -283,8 +283,8 @@ func (loop Loop) get_tile(ctx context.Context, http_headers map[string]string, n
return 204, http_headers, nil
}

var tilePattern = regexp.MustCompile(`^\/([-A-Za-z0-9_]+)\/(\d+)\/(\d+)\/(\d+)\.([a-z]+)$`)
var metadataPattern = regexp.MustCompile(`^\/([-A-Za-z0-9_]+)\/metadata$`)
var tilePattern = regexp.MustCompile(`.*?\/([-A-Za-z0-9_]+)\/(\d+)\/(\d+)\/(\d+)\.([a-z]+)$`)
var metadataPattern = regexp.MustCompile(`.*?\/([-A-Za-z0-9_]+)\/metadata$`)

func (loop Loop) Get(ctx context.Context, path string) (int, map[string]string, []byte) {
http_headers := make(map[string]string)
Expand Down

0 comments on commit ece5bbc

Please sign in to comment.