Baoyuantop commented on code in PR #12996:
URL: https://github.com/apache/apisix/pull/12996#discussion_r2796894864
##########
apisix/router.lua:
##########
@@ -87,6 +87,14 @@ function _M.http_init_worker()
router_ssl.init_worker()
_M.router_ssl = router_ssl
+ -- Initialize stream router in HTTP workers only if stream mode is enabled
+ -- This allows the Control API (which runs in HTTP workers) to access
stream routes
+ if conf and conf.apisix and conf.apisix.stream_proxy then
+ local router_stream = require("apisix.stream.router.ip_port")
+ router_stream.stream_init_worker(filter)
Review Comment:
This filter function handles HTTP-specific fields like host and hosts,
performing meaningless operations on stream routes (stream routes lack a host
field but invoke `apisix_upstream.filter_upstream`).
If you don't consider this an issue, feel free to disregard this comment.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]