mirror of
https://codeberg.org/video-prize-ranch/rimgo.git
synced 2025-12-14 04:05:14 +00:00
Add 404 page
This commit is contained in:
@@ -32,6 +32,11 @@ func handleMedia(c *fiber.Ctx, url string) error {
|
||||
return err
|
||||
}
|
||||
|
||||
if res.StatusCode == 404 {
|
||||
c.Status(404)
|
||||
return c.Render("errors/404", nil)
|
||||
}
|
||||
|
||||
c.Set("Content-Type", res.Header.Get("Content-Type"));
|
||||
contentLen, _ := strconv.Atoi(res.Header.Get("Content-Length"))
|
||||
return c.SendStream(res.Body, contentLen)
|
||||
|
||||
Reference in New Issue
Block a user