Fix too greedy router expression

This commit is contained in:
Miko 2024-12-19 11:39:47 +01:00 committed by GitHub
parent 20ffc999f0
commit 24154d05c2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -605,7 +605,7 @@ function start(opts) {
};
});
serveTemplate('/data/(:preview(preview)/)?:id/', 'data', (req) => {
serveTemplate('^/data/(:preview(preview)/)?:id/$', 'data', (req) => {
const id = req.params.id;
const preview = req.params.preview || undefined;
const data = serving.data[id];