Skip to content

HydraConsole beyind a proxy #23

@gioppoluca

Description

@gioppoluca

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions