Skip to content

Commit

Permalink
Merge pull request #440 from canonical/fix/ui-assets-serving
Browse files Browse the repository at this point in the history
fix: avoid escaping when passing URL to template
  • Loading branch information
BarcoMasile authored Oct 18, 2024
2 parents 1a1e2c9 + 0702053 commit 0a20aab
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/ui/handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ func (a *API) uiFiles(w http.ResponseWriter, r *http.Request) {
normContextPath += "/"
}

err = t.Execute(w, normContextPath)
err = t.Execute(w, template.URL(normContextPath))
if err != nil {
a.logger.Error("Failed to process %s template: ", indexTemplate, err)
a.internalServerErrorResponse(w, err)
Expand Down

0 comments on commit 0a20aab

Please sign in to comment.