mirror of
https://github.com/zedeus/nitter
synced 2026-09-06 07:09:31 +00:00
Use custom 404 page, halt on 404 instead of resp
This commit is contained in:
parent
8fcdfa744a
commit
ebb89edef6
7 changed files with 12 additions and 9 deletions
|
|
@ -33,7 +33,7 @@ proc createMediaRouter*(cfg: Config) =
|
|||
discard
|
||||
|
||||
if not existsFile(filename):
|
||||
resp Http404
|
||||
halt Http404
|
||||
|
||||
let file = openAsync(filename)
|
||||
let buf = await readAll(file)
|
||||
|
|
@ -58,7 +58,7 @@ proc createMediaRouter*(cfg: Config) =
|
|||
discard
|
||||
|
||||
if content.len == 0:
|
||||
resp Http404
|
||||
halt Http404
|
||||
|
||||
resp content, mimetype(url)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue