R rdn Well-known member Jan 27, 2022 #1 If I enable $config['http']['proxy'] via config.php, does Outgoing Push Notification be sent out via the proxy server? Thanks.
If I enable $config['http']['proxy'] via config.php, does Outgoing Push Notification be sent out via the proxy server? Thanks.
Solution Chris D Jan 27, 2022 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);
Chris D XenForo developer Staff member Jan 27, 2022 #2 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); Upvote 1 Downvote 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);
R rdn Well-known member Feb 3, 2022 #4 Tested with TinyProxy and working as expected Upvote 0 Downvote