Skip to content

Commit

Permalink
fix proxy log stream
Browse files Browse the repository at this point in the history
  • Loading branch information
tiancandevloper authored and zhujf1989 committed Aug 30, 2023
1 parent fe25b8d commit c5dd035
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions pkg/apiserver/cubeapi/resourcemanage/handle/proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -347,11 +347,16 @@ func needModifyResponse(proxyUrl string, c *gin.Context) bool {
// When there is a watch, it is a long connection request.
// At this time, the returned data should not be filtered
// watch is divided into two cases, one is watch=true in the query parameter, and the other is watch in the path, such as /api/v1/watch/namespaces/default/pods
// 1. watch=true in the query parameter
// 1. follow=true || watch = true in the query parameter
follow := c.Query("follow")
isFollow, _ := strconv.ParseBool(follow)
if isFollow {
return false
}
watch := c.Query("watch")
isWatch, _ := strconv.ParseBool(watch)
if isWatch {
modifyResponse = false
return false
}
// 2. watch in the path
if len(proxyUrl) > 0 {
Expand Down

0 comments on commit c5dd035

Please sign in to comment.