New icons for all shit
MindSift CI & Docker Release / Build, Test in Container & Push (push) Successful in 1m22s

This commit is contained in:
sandrodach committed 2026-10-28 19:01:08 +01:00
1 parent f82ab2fd32
commit 3540b4b2ae
17 files changed
+117 -7

No files matched your search

+23
View File
@@ -254,6 +254,29 @@ func (s *Server) Router() http.Handler {
w.Header().Set("Pragma", "no-cache")
w.Header().Set("Expires", "0")
}
if path == "index.html" {
if data, err := fs.ReadFile(s.staticFS, "index.html"); err == nil {
scheme := "http"
if req.TLS != nil || req.Header.Get("X-Forwarded-Proto") == "https" {
scheme = "https"
}
host := req.Header.Get("X-Forwarded-Host")
if host == "" {
host = req.Host
}
if host != "" {
origin := scheme + "://" + host
htmlStr := string(data)
htmlStr = strings.ReplaceAll(htmlStr, `content="/og-image.png"`, `content="`+origin+`/og-image.png"`)
htmlStr = strings.ReplaceAll(htmlStr, `property="og:url" content="/"`, `property="og:url" content="`+origin+`/"`)
data = []byte(htmlStr)
}
w.Header().Set("Content-Type", "text/html; charset=utf-8")
w.WriteHeader(http.StatusOK)
_, _ = w.Write(data)
return
}
}
fileServer.ServeHTTP(w, req)
})
}