Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. RequestProxy.php

function RequestProxy::supportsSecureProxy

Returns true if an HTTPS proxy can be used.

This depends on PHP7.3+ for CURL_VERSION_HTTPS_PROXY and curl including the feature (from version 7.52.0)

1 call to RequestProxy::supportsSecureProxy()
RequestProxy::getCurlOptions in vendor/composer/composer/src/Composer/Util/Http/RequestProxy.php
Returns an array of curl proxy options

File

vendor/composer/composer/src/Composer/Util/Http/RequestProxy.php, line 158

Class

RequestProxy
@internal @author John Stevenson <john-stevenson@blueyonder.co.uk>

Namespace

Composer\Util\Http

Code

public function supportsSecureProxy() : bool {
    if (false === ($version = curl_version()) || !defined('CURL_VERSION_HTTPS_PROXY')) {
        return false;
    }
    $features = $version['features'];
    return (bool) ($features & CURL_VERSION_HTTPS_PROXY);
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal