fix: таймауты, ReadFile error, ?bucket= убран, USER registry
This commit is contained in:
+6
-1
@@ -64,7 +64,12 @@ func rootHandler(w http.ResponseWriter, r *http.Request) {
|
||||
return
|
||||
}
|
||||
w.Header().Set("Content-Type", "text/html; charset=utf-8")
|
||||
tmpl, _ := templateFS.ReadFile("templates/index.html")
|
||||
tmpl, err := templateFS.ReadFile("templates/index.html")
|
||||
if err != nil {
|
||||
log.Printf("root: template read error: %v", err)
|
||||
http.Error(w, "Internal Server Error", http.StatusInternalServerError)
|
||||
return
|
||||
}
|
||||
html := strings.Replace(string(tmpl), "{{.Version}}", VERSION, 1)
|
||||
fmt.Fprint(w, html)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user