mirror of
https://github.com/mjl-/mox.git
synced 2024-12-26 08:23:48 +03:00
add comment about the embedded html files
after review note by jonathan hall, thanks!
This commit is contained in:
parent
37713a974c
commit
e2516444b1
2 changed files with 4 additions and 0 deletions
|
@ -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()
|
||||
|
|
|
@ -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()
|
||||
|
|
Loading…
Reference in a new issue