From 5ed2499a1d8806fe78369b5b492d7990218131c9 Mon Sep 17 00:00:00 2001 From: SayaAndy Date: Tue, 26 Aug 2025 00:39:22 +0700 Subject: feat: client hash cache feat: add local config feat: create a volume for data (for the future) format: unname unused vars --- main.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'main.go') diff --git a/main.go b/main.go index 566e796..9f95c04 100644 --- a/main.go +++ b/main.go @@ -68,7 +68,9 @@ func main() { localization[lang.Name] = localeCfg } - app := fiber.New(fiber.Config{}) + app := fiber.New(fiber.Config{ + ProxyHeader: "X-Forwarded-For", + }) app.Use(redirect.New(redirect.Config{ Rules: map[string]string{ @@ -78,6 +80,8 @@ func main() { StatusCode: 301, })) + router.CCache = router.NewClientCache([]byte(cfg.Auth.Salt)) + app.Get("/", router.Root(cfg.AvailableLanguages)) app.Get("/:lang/map", router.Lang_Map(localization, availableLanguages, b2Client)) app.Get("/:lang/blog", router.Lang_Blog(localization, availableLanguages, b2Client)) -- cgit v1.3.1+13