Respond Not Found when a prefix is empty

This commit is contained in:
Martijn van der Ven
2020-05-23 21:25:38 +02:00
parent c2510d302a
commit c7fd603933

View File

@@ -117,7 +117,9 @@ module.exports = async function (req, res) {
getHash(getIP(req) + config.globalSalt)
);
if (segments) {
res.send(segments)
if (Object.keys(segments).length > 0) {
res.send(segments);
} else {
res.sendStatus(404); // No skipable segments within this prefix
}
}