Skip to content

Commit

Permalink
fix proxy log stream
Browse files Browse the repository at this point in the history
  • Loading branch information
tiancandevloper committed Sep 11, 2023
1 parent 462f7a4 commit be32a05
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 be32a05

Please sign in to comment.