XF 2.2 Push Notifications and $config['http']['proxy']

rdn

Well-known member
If I enable $config['http']['proxy'] via config.php, does Outgoing Push Notification be sent out via the proxy server?

Thanks.
 
Solution
Yes.

PHP:
        $httpOptions = $this->app->http()->getDefaultClientOptions();

        $config = $this->app->config();
        if ($config['http']['proxy'])
        {
            $httpOptions['proxy'] = $config['http']['proxy'];
        }

        return new WebPush($auth, [], 10, $httpOptions);
Yes.

PHP:
        $httpOptions = $this->app->http()->getDefaultClientOptions();

        $config = $this->app->config();
        if ($config['http']['proxy'])
        {
            $httpOptions['proxy'] = $config['http']['proxy'];
        }

        return new WebPush($auth, [], 10, $httpOptions);
 
Solution
Top Bottom