diff options
| author | Jeff Carr <[email protected]> | 2024-11-06 17:10:00 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2024-11-06 17:10:00 -0600 |
| commit | e591cdd6857b1d3f2b84d5fa54931758f363300d (patch) | |
| tree | cc59826786031d0c607d0584d5f52f499c330a7b /main.go | |
| parent | 316f169bc0e5ed955fea15aed2fd1d1055a7c5c2 (diff) | |
read the footer.html from /etc
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'main.go')
| -rw-r--r-- | main.go | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -54,7 +54,14 @@ func okHandler(w http.ResponseWriter, r *http.Request) { indexBodyStart(w) indexBodyScanConfig(w) indexDivEnd(w) - writeFile(w, "footer.html") + pfile, err := os.ReadFile("/etc/gowebd/footer.html") + if err == nil { + fmt.Fprint(w, string(pfile)) + } else { + log.Warn(err, "no footer filee found in /etc/gowebd/footer.html") + log.Warn("falling back to the resources/footer.html") + writeFile(w, "footer.html") + } indexBodyEnd(w) return } |
