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