HydraConsole icon indicating copy to clipboard operation
HydraConsole copied to clipboard

HydraConsole beyind a proxy

Open gioppoluca opened this issue 9 years ago • 0 comments

Using the Hydra Console behind a proxy does not work there are 2 places where proxy information needs to be set to allow it to work:

  1. proxylib _makeCurlRequest curl_setopt($curl_handle, CURLOPT_PROXY, "proxy.server.com:3128"); curl_setopt($curl_handle, CURLOPT_HEADER, true); curl_setopt($curl_handle, CURLOPT_USERAGENT, $this->_requestUserAgent); curl_setopt($curl_handle, CURLOPT_RETURNTRANSFER, true);

  2. FileGetContentsLoader.loadDocument $streamContextOptions = array( 'method' => 'GET', 'header' => "Accept: application/ld+json, application/json; q=0.9, /; q=0.1\r\n", 'timeout' => Processor::REMOTE_TIMEOUT, 'request_fulluri' => true, 'proxy' => 'tcp://proxy.server.com:3128', );

With those two hacks it works; should be possible to set the proxy at AjaxProxy level and at JsonLD level

gioppoluca avatar May 20 '16 13:05 gioppoluca