diff options
author | Alan Pearce | 2024-05-30 13:54:29 +0200 |
---|---|---|
committer | Alan Pearce | 2024-05-30 13:54:29 +0200 |
commit | 4698a97974ae82e7bd8592828c58294b222a58ff (patch) | |
tree | fc7d6357534efffc69301fb01c6e04143288dbec /internal/server | |
parent | b02076363f979daa6ac313058eb140d1d67ce184 (diff) | |
download | searchix-4698a97974ae82e7bd8592828c58294b222a58ff.tar.lz searchix-4698a97974ae82e7bd8592828c58294b222a58ff.tar.zst searchix-4698a97974ae82e7bd8592828c58294b222a58ff.zip |
feat: enable sub-resource integrity for assets
Diffstat (limited to 'internal/server')
-rw-r--r-- | internal/server/mux.go | 4 |
1 files changed, 4 insertions, 0 deletions
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) |