feat: Added favicon

This commit is contained in:
Christian Ditaputratama 2024-10-31 18:55:31 +07:00
parent f6adb40b3f
commit 30aa8d80dc
No known key found for this signature in database
GPG key ID: 31D3D06D77950979
2 changed files with 5 additions and 0 deletions

View file

@ -16,6 +16,7 @@ import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/cors"
"github.com/gofiber/fiber/v2/middleware/favicon"
"github.com/gofiber/fiber/v2/middleware/logger"
"github.com/gofiber/fiber/v2/middleware/recover"
"github.com/spf13/cobra"
@ -74,6 +75,10 @@ func serve() {
AllowCredentials: true,
}))
app.Use(favicon.New(favicon.Config{
File: "internal/handler/views/assets/favicon.ico",
URL: "/favicon.ico",
}))
app.Use("/assets", views.EmbedAssets())
app.Routes()

View file

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB