mirror of
https://codeberg.org/video-prize-ranch/rimgo.git
synced 2025-06-27 15:38:23 +00:00
Only show image errors on image direct links
This commit is contained in:
parent
1579e59dca
commit
fb82afc7dd
@ -9,7 +9,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func RenderError(c *fiber.Ctx, code int) error {
|
func RenderError(c *fiber.Ctx, code int) error {
|
||||||
if !strings.Contains(c.Get("Accept"), "html") {
|
if !strings.Contains(c.Get("Accept"), "html") && c.Params("extension") != "" {
|
||||||
codeStr := "generic"
|
codeStr := "generic"
|
||||||
if code != 0 {
|
if code != 0 {
|
||||||
codeStr = strconv.Itoa(code)
|
codeStr = strconv.Itoa(code)
|
||||||
|
Loading…
Reference in New Issue
Block a user