[Warning] file_get_contents(https://taconnections.titlealliance.com/assets/website/Devon9.pdf): failed to open stream: HTTP request failed! HTTP/1.1 502 Bad Gateway

GET /documents/download/739

Line 242 in /var/www/html/vhosts/titlealliance.com/mysite/code/JV-PageTypes/JVDocumentsPage.php

Source

233         }
234 
235         return $this->remoteNoCompanies();
236     }
237 
238     public function download(SS_HTTPRequest $request) {
239         $url_params = $request->allParams();
240 
241         if ($document = $this->getDocument($url_params['ID'])) {
242             return SS_HTTPRequest::send_file(file_get_contents(REMOTE_DOMAIN.$document['Filepath']), $document['Filename']);
243         }
244 
245         $this->httpError(404);
246         return $this->render();
247     }
248 

Trace