Skip to content

Commit

Permalink
Allow PUT
Browse files Browse the repository at this point in the history
  • Loading branch information
joecorall committed Apr 26, 2024
1 parent 1564314 commit 6fe1130
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ func main() {
}

func MessageHandler(w http.ResponseWriter, r *http.Request) {
if r.Method != http.MethodPost {
if r.Method != http.MethodPost && r.Method != http.MethodPut {
slog.Error("Method not allowed", "method", r.Method)
w.WriteHeader(http.StatusMethodNotAllowed)
return
}
Expand Down

0 comments on commit 6fe1130

Please sign in to comment.