From 9cdd254edaa955b9151b42d675152e35d2e7cbba Mon Sep 17 00:00:00 2001 From: Eduard Urbach Date: Tue, 6 Jun 2017 13:07:42 +0200 Subject: [PATCH] Simplified file upload --- main.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/main.go b/main.go index b886bb7d..862407b7 100644 --- a/main.go +++ b/main.go @@ -47,14 +47,14 @@ func main() { app.Ajax("/airing", airing.Get) app.Ajax("/users", users.Get) - app.Get("/manifest.json", func(ctx *aero.Context) string { - return ctx.JSON(app.Config.Manifest) + // Favicon + app.Get("/favicon.ico", func(ctx *aero.Context) string { + return ctx.File("images/icons/favicon.ico") }) - app.Get("/favicon.ico", func(ctx *aero.Context) string { - ctx.SetHeader("Content-Type", "image/x-icon") - data, _ := ioutil.ReadFile("images/icons/favicon.ico") - return string(data) + // Web manifest + app.Get("/manifest.json", func(ctx *aero.Context) string { + return ctx.JSON(app.Config.Manifest) }) // For benchmarks