My nginx server have two endpoint. /callback/model/ as one and second /execute I want to get the complete uri of callback endpoint with in my execute.
eg: {http://ip:port}/callback/model/ or {domain}/callback/model/
Initially i tried constructing the uri as below
ngx.var.scheme .. "://" .. ngx.var.host ..":31003" .. "/callback/model/"
It works most the cases . But fails if I have domain or if port changes
Is there some way which nginx know the host its deployed and port details ? My service is a dockerised nginx server.