nullability fix
This commit is contained in:
@@ -42,11 +42,13 @@ func createProxy(target *url.URL) func(http.ResponseWriter, *http.Request) {
|
|||||||
var jsonData map[string]interface{}
|
var jsonData map[string]interface{}
|
||||||
json.NewDecoder(r.Body).Decode(&jsonData)
|
json.NewDecoder(r.Body).Decode(&jsonData)
|
||||||
|
|
||||||
if jsonData["stream"].(bool) == false {
|
if jsonData["stream"] != nil {
|
||||||
|
if !jsonData["stream"].(bool) {
|
||||||
notStreamed.Inc()
|
notStreamed.Inc()
|
||||||
} else {
|
} else {
|
||||||
streamed.Inc()
|
streamed.Inc()
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
modifyResponse := func(response *http.Response) error {
|
modifyResponse := func(response *http.Response) error {
|
||||||
pr, pw := io.Pipe()
|
pr, pw := io.Pipe()
|
||||||
|
|||||||
Reference in New Issue
Block a user