Added favicon

This commit is contained in:
darmiel 2021-05-15 13:54:10 +02:00
parent 41ff4d018d
commit fcf2f2372a
8 changed files with 8 additions and 2 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 91 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

BIN
assets/YAxC-Filled@64px.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

BIN
assets/favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

View file

@ -2,6 +2,7 @@ package server
import (
"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/favicon"
"github.com/gofiber/fiber/v2/middleware/limiter"
"strings"
"time"
@ -10,7 +11,7 @@ import (
func (s *yAxCServer) Start() {
log.Info("Starting YAxC server on", s.BindAddress)
cfg := &fiber.Config{Immutable: true}
cfg := fiber.Config{}
if s.ProxyHeader != "" {
if s.ProxyHeader == "$proxy" {
@ -18,7 +19,12 @@ func (s *yAxCServer) Start() {
}
cfg.ProxyHeader = s.ProxyHeader
}
s.App = fiber.New(*cfg)
s.App = fiber.New(cfg)
s.App.Use(favicon.New(favicon.Config{
File: "./assets/favicon.ico",
}))
// limiter middleware
s.App.Use(limiter.New(limiter.Config{