mirror of
https://github.com/timvisee/send.git
synced 2025-10-03 17:49:18 +02:00
set downloadMetadata.status to 404 on unfound downloads. fixes #1501
This commit is contained in:
parent
fbc4107262
commit
246e2c8db0
2 changed files with 15 additions and 2 deletions
|
@ -59,6 +59,15 @@ module.exports = {
|
|||
|
||||
notfound: async function(req, res) {
|
||||
const appState = await state(req);
|
||||
res.status(404).send(stripEvents(routes().toString('/404', appState)));
|
||||
res
|
||||
.status(404)
|
||||
.send(
|
||||
stripEvents(
|
||||
routes().toString(
|
||||
'/404',
|
||||
Object.assign(appState, { downloadMetadata: { status: 404 } })
|
||||
)
|
||||
)
|
||||
);
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue