nullability fix

This commit is contained in:
2025-04-25 08:43:03 +03:00
parent f50d0c9f28
commit 4687c67685

View File

@@ -42,11 +42,13 @@ func createProxy(target *url.URL) func(http.ResponseWriter, *http.Request) {
var jsonData map[string]interface{}
json.NewDecoder(r.Body).Decode(&jsonData)
if jsonData["stream"].(bool) == false {
if jsonData["stream"] != nil {
if !jsonData["stream"].(bool) {
notStreamed.Inc()
} else {
streamed.Inc()
}
}
modifyResponse := func(response *http.Response) error {
pr, pw := io.Pipe()