From 87b0ed9b97706793d2b46c5b9196389578709445 Mon Sep 17 00:00:00 2001 From: Xe Iaso Date: Tue, 29 Jul 2025 16:24:06 +0000 Subject: [PATCH] feat(lib): automatically allow any urls in the ogtags allow cache Signed-off-by: Xe Iaso --- lib/anubis.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/anubis.go b/lib/anubis.go index 06b030a..a14b63a 100644 --- a/lib/anubis.go +++ b/lib/anubis.go @@ -152,6 +152,12 @@ func (s *Server) maybeReverseProxyOrPage(w http.ResponseWriter, r *http.Request) func (s *Server) maybeReverseProxy(w http.ResponseWriter, r *http.Request, httpStatusOnly bool) { lg := internal.GetRequestLogger(r) + if val, _ := s.store.Get(r.Context(), fmt.Sprintf("ogtags:allow:%s%s", r.Host, r.URL.String())); val != nil { + lg.Debug("serving opengraph tag asset") + s.ServeHTTPNext(w, r) + return + } + // Adjust cookie path if base prefix is not empty cookiePath := "/" if anubis.BasePrefix != "" {