diff options
| author | 2025-08-26 00:39:22 +0700 | |
|---|---|---|
| committer | 2025-08-26 00:39:22 +0700 | |
| commit | 5ed2499a1d8806fe78369b5b492d7990218131c9 (patch) | |
| tree | 0a9e0548aa145986b654af81554f16c8cf544c41 /main.go | |
| parent | b815b74d7a943d1f71a0ddcf6b343d3958d2b97a (diff) | |
| download | web-5ed2499a1d8806fe78369b5b492d7990218131c9.tar.gz web-5ed2499a1d8806fe78369b5b492d7990218131c9.zip | |
feat: client hash cache
feat: add local config
feat: create a volume for data (for the future)
format: unname unused vars
Diffstat (limited to 'main.go')
| -rw-r--r-- | main.go | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -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)) |