1
0
mirror of https://github.com/labstack/echo.git synced 2025-01-01 22:09:21 +02:00

proxy middleware should use http proxy for SSE requests (#2624)

This commit is contained in:
Martti T 2024-04-15 21:12:26 +03:00 committed by GitHub
parent 3062025405
commit e0f2a02e4c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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)
}