- 
                Notifications
    
You must be signed in to change notification settings  - Fork 2.7k
 
feat: adds support for nginx variables in service_name param #12187
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from 31 commits
90b3c13
              9def4fb
              cfea8d8
              3b90fe2
              ac76dd7
              2160c51
              e8e086c
              5a907fa
              ab7bc5d
              3a623bc
              5b457df
              b661517
              5f19d54
              7548cf8
              b669e78
              e8b18c1
              7d411d3
              8a14a9e
              9c58805
              dbb795a
              54d12c9
              3b5782d
              c6da5d1
              100fa55
              b688b39
              2c3d085
              6fdd1ec
              641fe78
              e54929a
              6f21de0
              94920a4
              e7f886c
              fdcd511
              3cd47e5
              a7ca200
              File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | 
|---|---|---|
| 
          
            
          
           | 
    @@ -305,7 +305,12 @@ function _M.set_by_route(route, api_ctx) | |
| return 503, err | ||
| end | ||
| 
     | 
||
| local new_nodes, err = dis.nodes(up_conf.service_name, up_conf.discovery_args) | ||
| local service_name, err = core.utils.resolve_var(up_conf.service_name, api_ctx.var) | ||
| if not service_name or service_name == "" then | ||
| return 503, "resolve_var resolves to empty string: " .. (err or "nil") | ||
| end | ||
| 
     | 
||
| local new_nodes, err = dis.nodes(service_name, up_conf.discovery_args) | ||
| if not new_nodes then | ||
| return HTTP_CODE_UPSTREAM_UNAVAILABLE, "no valid upstream node: " .. (err or "nil") | ||
                
       | 
||
| end | ||
| 
          
            
          
           | 
    ||
Uh oh!
There was an error while loading. Please reload this page.