Skip to content

Commit 1d6739b

Browse files
committed
internal/stdlog: make logs endpoints POST only
1 parent 5562409 commit 1d6739b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

internal/stdlog/stdlog.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,11 @@ var HTTPErrorLog = slog.NewLogLogger(newFilterHandler(
5252
), slog.LevelWarn)
5353

5454
func init() {
55-
http.HandleFunc("/debug/logs/on", func(w http.ResponseWriter, r *http.Request) {
55+
http.HandleFunc("POST /debug/logs/on", func(w http.ResponseWriter, r *http.Request) {
5656
logLevel.Set(slog.LevelDebug)
5757
w.WriteHeader(http.StatusOK)
5858
})
59-
http.HandleFunc("/debug/logs/off", func(w http.ResponseWriter, r *http.Request) {
59+
http.HandleFunc("POST /debug/logs/off", func(w http.ResponseWriter, r *http.Request) {
6060
logLevel.Set(slog.LevelInfo)
6161
w.WriteHeader(http.StatusOK)
6262
})

0 commit comments

Comments
 (0)