summaryrefslogtreecommitdiffci
path: root/internal/router/lang-blog-title.go
diff refs
from: back
to: back
| flip
diff options
context:
space:
mode:
authorGravatar SayaAndy <saya.andy@posteo.com> 2025-08-26 00:39:22 +0700
committerGravatar SayaAndy <saya.andy@posteo.com> 2025-08-26 00:39:22 +0700
commit5ed2499a1d8806fe78369b5b492d7990218131c9 (patch)
tree0a9e0548aa145986b654af81554f16c8cf544c41 /internal/router/lang-blog-title.go
parentb815b74d7a943d1f71a0ddcf6b343d3958d2b97a (diff)
downloadweb-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 'internal/router/lang-blog-title.go')
-rw-r--r--internal/router/lang-blog-title.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/internal/router/lang-blog-title.go b/internal/router/lang-blog-title.go
index b7b5d7e..5b80ec8 100644
--- a/internal/router/lang-blog-title.go
+++ b/internal/router/lang-blog-title.go
@@ -22,6 +22,10 @@ func init() {
func Lang_Blog_Title(l map[string]*locale.LocaleConfig, langs []string, b2Client *b2.B2Client, md goldmark.Markdown) func(c *fiber.Ctx) error {
return func(c *fiber.Ctx) error {
+ ip := c.IP()
+ slog.Debug("client entering blog page", slog.String("ip", ip), slog.String("page", c.Path()))
+ go CCache.GetHash(ip)
+
lang := c.Params("lang")
if !slices.Contains(langs, lang) {
c.Set(fiber.HeaderContentType, fiber.MIMETextPlainCharsetUTF8)