Rocket.Chat icon indicating copy to clipboard operation
Rocket.Chat copied to clipboard

Image autoloading does not work behind proxy

Open kakawait opened this issue 11 years ago • 4 comments

Autoloading gif/image feature is important feature for our team building (or flaming) but when using Rocket.Chat behind corporate proxy feature is broken even with http_proxy and https_proxy variable set.

Indeed you are using http or https package from NodeJs that does not respect env variable like http_proxy or https_proxy.

In order to support proxy you should:

  1. Try request package instead that respect env variable (https://github.com/request/request#controlling-proxy-behaviour-using-environment-variables)
  2. Use such package https://www.npmjs.com/package/http-proxy-agent with http/https to handle proxy for both http and https (more information http://blog.vanamco.com/proxy-requests-in-node-js/)

kakawait avatar Sep 22 '15 13:09 kakawait

:+1:

vpusher avatar Sep 22 '15 13:09 vpusher

If it's candidate to contribution/PR you should decide if it's possible to remove http/https node package for request package or you want to keep them and try to enable proxy feature on them?

I know that corporate proxy features is specific but for a self-hosted solution is really important (in my mind), but it can be also difficult for you to develop it if you are proxy-less environment.

kakawait avatar Sep 23 '15 08:09 kakawait

:+1:

indiggio avatar Sep 23 '15 13:09 indiggio

Closing this one instead of #1194 - hopefully some Digital Ocean hackers will pick it up and add a fix soon. Thanks @kakawait !

Sing-Li avatar Oct 22 '15 18:10 Sing-Li