mirror of
https://github.com/gen2brain/cam2ip.git
synced 2025-12-16 04:18:39 +00:00
Update handlers
This commit is contained in:
@@ -32,12 +32,13 @@ func (h *HTML) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
||||
if r.Method != "GET" && r.Method != "HEAD" {
|
||||
msg := fmt.Sprintf("405 Method Not Allowed (%s)", r.Method)
|
||||
http.Error(w, msg, http.StatusMethodNotAllowed)
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
w.Header().Set("Content-Type", "text/html; charset=utf-8")
|
||||
w.WriteHeader(http.StatusOK)
|
||||
w.Write(h.Template)
|
||||
_, _ = w.Write(h.Template)
|
||||
}
|
||||
|
||||
var html = `<html>
|
||||
|
||||
Reference in New Issue
Block a user