membphis commented on a change in pull request #2132:
URL: https://github.com/apache/apisix/pull/2132#discussion_r479717054
##########
File path: apisix/init.lua
##########
@@ -297,6 +298,35 @@ local function return_direct(...)
end
+local function set_upstream_host(api_ctx)
+ local pass_host = api_ctx.pass_host
+ if pass_host and pass_host ~= "pass" then
Review comment:
bad style, we should return asap. here is an example:
```lua
local pass_host = api_ctx.pass_host or "pass"
if pass_host == "pass" then
return
end
if pass_host == "rewrite" then
... ...
return
end
-- node model
... ...
return
```
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]