{"action":"created","issue":{"url":"https://api.github.com/repos/Kong/kong/issues/2834","repository_url":"https://api.github.com/repos/Kong/kong","labels_url":"https://api.github.com/repos/Kong/kong/issues/2834/labels{/name}","comments_url":"https://api.github.com/repos/Kong/kong/issues/2834/comments","events_url":"https://api.github.com/repos/Kong/kong/issues/2834/events","html_url":"https://github.com/Kong/kong/issues/2834","id":251888820,"number":2834,"title":"ngx.ctx.upstream_url = \"http://www.otherurl.com\" does not work in kong > 0.9","user":{"login":"zamarroz","id":20395479,"avatar_url":"https://avatars1.githubusercontent.com/u/20395479?v=4","gravatar_id":"","url":"https://api.github.com/users/zamarroz","html_url":"https://github.com/zamarroz","followers_url":"https://api.github.com/users/zamarroz/followers","following_url":"https://api.github.com/users/zamarroz/following{/other_user}","gists_url":"https://api.github.com/users/zamarroz/gists{/gist_id}","starred_url":"https://api.github.com/users/zamarroz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zamarroz/subscriptions","organizations_url":"https://api.github.com/users/zamarroz/orgs","repos_url":"https://api.github.com/users/zamarroz/repos","events_url":"https://api.github.com/users/zamarroz/events{/privacy}","received_events_url":"https://api.github.com/users/zamarroz/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2017-08-22T09:10:42Z","updated_at":"2017-11-02T03:41:58Z","closed_at":"2017-11-02T03:41:58Z","author_association":"NONE","body":"I`m trying to change ngx.ctx.upstream_url value but in kong versions over than 0.9 does not work. Has this changed in the new versions?"},"comment":{"url":"https://api.github.com/repos/Kong/kong/issues/comments/341309579","html_url":"https://github.com/Kong/kong/issues/2834#issuecomment-341309579","issue_url":"https://api.github.com/repos/Kong/kong/issues/2834","id":341309579,"user":{"login":"thibaultcha","id":1125431,"avatar_url":"https://avatars2.githubusercontent.com/u/1125431?v=4","gravatar_id":"","url":"https://api.github.com/users/thibaultcha","html_url":"https://github.com/thibaultcha","followers_url":"https://api.github.com/users/thibaultcha/followers","following_url":"https://api.github.com/users/thibaultcha/following{/other_user}","gists_url":"https://api.github.com/users/thibaultcha/gists{/gist_id}","starred_url":"https://api.github.com/users/thibaultcha/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thibaultcha/subscriptions","organizations_url":"https://api.github.com/users/thibaultcha/orgs","repos_url":"https://api.github.com/users/thibaultcha/repos","events_url":"https://api.github.com/users/thibaultcha/events{/privacy}","received_events_url":"https://api.github.com/users/thibaultcha/received_events","type":"User","site_admin":false},"created_at":"2017-11-02T03:41:58Z","updated_at":"2017-11-02T03:41:58Z","author_association":"OWNER","body":"Hi,\r\n\r\nIndeed, following the introduction of load balancing capabilities in Kong 0.10.0, updating the host of an upstream request does not mean updating the `ngx.var.upstream_url` variable anymore. Since this is officially an unsupported feature for plugins (but still possible, heck, our own plugins even do it!), it is a bit hard to get around the codebase and implement those feature yourself (update upstream URL or upstream host/port), I know...\r\n\r\nSee the `ngx.ctx.balancer_address.host` and `ngx.ctx.balancer_address.port`, as well as `ngx.var.upstream_uri` variable for tweaking these values in Kong 0.11.\r\n\r\nIn the future, we intend to provide plugins developers with a full-fledged API for manipulating such values from your Lua code, with minimal efforts :)\r\n\r\nThanks!"}}
{"actor":{"display_login":"thibaultcha"}}