There was an error while loading. Please reload this page.
1 parent 17815fc commit 7b87880Copy full SHA for 7b87880
1 file changed
relay/relay_util/heartbeat.go
@@ -3,6 +3,7 @@ package relay_util
3
import (
4
"context"
5
"fmt"
6
+ "net/http"
7
"one-api/common/logger"
8
"one-api/common/requester"
9
"sync/atomic"
@@ -72,7 +73,8 @@ func (h *Heartbeat) writeHeader() bool {
72
73
if h.isStream {
74
requester.SetEventStreamHeaders(h.c)
75
} else {
- h.c.Header("Content-Type", "application/json")
76
+ h.c.Writer.Header().Set("Content-Type", "application/json")
77
+ h.c.Writer.WriteHeader(http.StatusOK)
78
}
79
return true
80
0 commit comments