Documents can now specify a content-type

This commit is contained in:
2024-12-05 14:54:26 -05:00
parent b395963709
commit abf3fc3ae3
3 changed files with 16 additions and 6 deletions

View File

@@ -81,6 +81,10 @@ func (this *handler) serveFile (res http.ResponseWriter, req *http.Request, file
this.serveError(res, req, http.StatusInternalServerError, err)
return
}
if document.ContentType != "" {
log.Println(document.ContentType)
res.Header().Set("Content-Type", document.ContentType)
}
err = document.Execute(res, step.ExecutionData {
Data: req,
})