threefoldtecharchive / jumpscaleX_threebot

Apache License 2.0
0 stars 3 forks source link

keep track of the port in url for links in chatflows #341

Closed xmonader closed 4 years ago

xmonader commented 4 years ago

chatflows expects to be working against localhost, ip, domain, but totally ignores if you use ssh tunnel and accessing chatflow over a specific port, port in the url needs to be preserved

e.g if you did something like

kosmos 'j.clients.ssh.get("explorer",addr="explorer.testnet.grid.tf").portforward_to_local(80,8081)'

and tried to access localhost:8081/zerobot/chatbot_examples/chats....

waleedhammam commented 4 years ago

After doing port forwarding for example from 80 to 5555

Internal redirects like oauth_proxy will call the endpoint at 80 which is not there.

also there's a reverse proxy from 80 to 9999 (bottle app) so if you are calling localhost:5555/endpoint where 5555 is forwarded from 80 it won't translate it to the correct source port unless you explicitly pass the correct port in the code

xmonader commented 4 years ago

won't tackle that.

xmonader commented 4 years ago

ports tracked on nginx level using http_host instead of host var