add comment about the embedded html files

after review note by jonathan hall, thanks!
This commit is contained in:
Mechiel Lukkien 2023-02-06 15:26:24 +01:00
parent 37713a974c
commit e2516444b1
No known key found for this signature in database
2 changed files with 4 additions and 0 deletions

View file

@ -82,6 +82,8 @@ func accountHandle(w http.ResponseWriter, r *http.Request) {
if r.Method == "GET" && r.URL.Path == "/account/" {
w.Header().Set("Content-Type", "text/html; charset=utf-8")
w.Header().Set("Cache-Control", "no-cache; max-age=0")
// We typically return the embedded admin.html, but during development it's handy
// to load from disk.
f, err := os.Open("http/account.html")
if err == nil {
defer f.Close()

View file

@ -161,6 +161,8 @@ func adminHandle(w http.ResponseWriter, r *http.Request) {
if r.Method == "GET" && r.URL.Path == "/admin/" {
w.Header().Set("Content-Type", "text/html; charset=utf-8")
w.Header().Set("Cache-Control", "no-cache; max-age=0")
// We typically return the embedded admin.html, but during development it's handy
// to load from disk.
f, err := os.Open("http/admin.html")
if err == nil {
defer f.Close()