Skip to content

Commit

Permalink
proxy middleware should use http proxy for SSE requests (#2624)
Browse files Browse the repository at this point in the history
  • Loading branch information
aldas authored Apr 15, 2024
1 parent 3062025 commit e0f2a02
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions middleware/proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -366,8 +366,7 @@ func ProxyWithConfig(config ProxyConfig) echo.MiddlewareFunc {
switch {
case c.IsWebSocket():
proxyRaw(tgt, c).ServeHTTP(res, req)
case req.Header.Get(echo.HeaderAccept) == "text/event-stream":
default:
default: // even SSE requests
proxyHTTP(tgt, c, config).ServeHTTP(res, req)
}

Expand Down

0 comments on commit e0f2a02

Please sign in to comment.