Ad Widget

Collapse

setProxy in JS HttpRequest no longer working?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • MichaelR
    Junior Member
    • Mar 2023
    • 3

    #1

    setProxy in JS HttpRequest no longer working?

    Hi all,

    after ugprading from 6.2.7 (on CentOS 8) to 6.4 (on Rocky Linux 9), notifications to RocketChat are no longer working for me. I have to go through an HTTP proxy, but it seems the call to setProxy is simply ignored.

    I'm using the default script for RC, which has
    Code:
    if (typeof RocketChat.HTTPProxy !== 'undefined' && RocketChat.HTTPProxy !== '') {
    request.setProxy(RocketChat.HTTPProxy);
    }​
    I made sure that HTTPProxy is set via debug messages, and even hardcoded request.setProxy("http://myproxyIP: port") without any if()-conditions around the call. But whatever I try, the request always fails with "Sending failed: Error: cannot get URL: Couldn't connect to server.".
    When I run tcpdump, i cannot even see an outgoing TCP connection to the proxy.

    As I said, the very same script in 6.2.7 worked just fine.

    Any ideas, what else I could try?

    Cheers,
    Michael
  • MichaelR
    Junior Member
    • Mar 2023
    • 3

    #2
    (As expected) no change with 6.4.1.

    In the meantime, I tried using IP addresses instead of hostnames everywhere (proxy URL, server name). Also different prefixes (http://, https://, none) for the proxy.

    Comment

    Working...