From 4698a97974ae82e7bd8592828c58294b222a58ff Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Thu, 30 May 2024 13:54:29 +0200 Subject: feat: enable sub-resource integrity for assets --- internal/server/mux.go | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'internal') diff --git a/internal/server/mux.go b/internal/server/mux.go index ea4b70c..87e878a 100644 --- a/internal/server/mux.go +++ b/internal/server/mux.go @@ -43,6 +43,7 @@ type TemplateData struct { ExtraHeadHTML template.HTML Code int Message string + Assets frontend.AssetCollection } type ResultData struct { @@ -94,6 +95,7 @@ func NewMux( indexData := TemplateData{ ExtraHeadHTML: cfg.Web.ExtraHeadHTML, Sources: cfg.Importer.Sources, + Assets: frontend.Assets, } w.Header().Add("Cache-Control", "max-age=86400") err := templates["index"].Execute(w, indexData) @@ -142,6 +144,7 @@ func NewMux( ExtraHeadHTML: cfg.Web.ExtraHeadHTML, Source: *source, Sources: cfg.Importer.Sources, + Assets: frontend.Assets, }, ResultsPerPage: search.ResultsPerPage, Query: qs, @@ -205,6 +208,7 @@ func NewMux( Sources: cfg.Importer.Sources, Source: *source, SourceResult: sourceResult, + Assets: frontend.Assets, }) if err != nil { errorHandler(w, r, err.Error(), http.StatusInternalServerError) -- cgit 1.4.1