Skip to content

Issues with connectivity when using a proxy #53

@sarhaynes

Description

@sarhaynes

The SimpleRisk code does not have the ability to bypass the proxy settings for certain addresses. This creates an issue when attempting to open a Risk or connect to the API. I have updated the code to hack around this, but we should be able to add a list of addresses or URLs that SimpleRisk does not proxy.

My hack is in the following functions in connectivity.php. I use hard-coded strings in my hack, but this should be a setting on the proxy setting page.

function fetch_url_content_via_curl(...) {
...
        // Configure proxy if needed
        if (($url == null) || !str_contains($url, "<excluded_string>")) {
            configure_curl_proxy($ch);
        }
...
}

function fetch_url_content_via_stream(...) {
...
    // Proxy settings
    if (get_setting("proxy_web_requests") && !str_contains($url, "<excluded_string>")) {
       ...
    }
...
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions