mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2025-12-11 22:17:14 +03:00
Respond Not Found when a prefix is empty
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user