diff options
Diffstat (limited to 'internal/web/server.go')
| -rw-r--r-- | internal/web/server.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/internal/web/server.go b/internal/web/server.go index f5d32d1..e3fef6e 100644 --- a/internal/web/server.go +++ b/internal/web/server.go @@ -373,6 +373,7 @@ type view struct { RootURL string Path string Lang string // i18n code, also the <html lang> + Media string // where the blog's files are served: /media, or /b/<sub>/media for the design preview on the root host Data map[string]any } @@ -384,7 +385,7 @@ func (s *Server) renderStatus(w http.ResponseWriter, r *http.Request, status int if data == nil { data = map[string]any{} } - v := view{User: currentUser(r), Blog: currentBlog(r), RootURL: s.cfg.RootURL(), Path: r.URL.Path, Lang: s.lang(r), Data: data} + v := view{User: currentUser(r), Blog: currentBlog(r), RootURL: s.cfg.RootURL(), Path: r.URL.Path, Lang: s.lang(r), Media: "/media", Data: data} if v.User != nil { v.CSRF = auth.CSRFToken(s.cfg.JWTSecret, v.User.ID, v.User.TokenVersion) } |
