QuotaGuard and Pantheon Integration Guide

QuotaGuard lets your Pantheon WordPress and Drupal applications send configured outbound requests through a load-balanced pair of static IP addresses. Use those addresses when an external API, payment gateway or partner service requires IP allowlisting.

You do not need QuotaGuard for internal Pantheon operations. Connections to Pantheon’s infrastructure, CDN and internal services normally work without this proxy configuration. This guide covers application-controlled outbound connections; incoming webhooks and access to your Pantheon site are separate connections.

Why Pantheon Sites Need Static IPs

Pantheon’s application containers use dynamic outbound IP addresses. An external service that accepts traffic only from known addresses may therefore reject a request even when the application’s credentials are correct. Check the destination’s response and firewall logs before assuming that every connection failure is an IP problem. Pantheon outgoing IP documentation

Common use cases include payment and banking APIs, partner APIs, CRM integrations and database services exposed through HTTP APIs. For example, an integration with FirstData, Line Pay, Salesforce or HubSpot may have source-IP requirements; check the particular service and configuration rather than assuming every account requires an allowlist. LDAP and native database connections can also have source-IP requirements, but their clients need separate transport configuration; WordPress or Drupal HTTP proxy settings do not configure them automatically.

QuotaGuard supplies a stable pair of source addresses for requests sent through the assigned proxy. IP allowlisting supplements the destination’s authentication; it does not replace API credentials or other access controls.

Check Compatibility Before Configuring the Client

Confirm these details with the developer or team responsible for the application:

  1. Direction: Is the connection made by your Pantheon application to an external service, or is it an incoming callback to your site?
  2. Destination: What protocol, hostname and port does the application use?
  3. Client: Does the request use the WordPress HTTP API, Drupal’s HTTP client, an independent Guzzle or cURL client, or a native extension such as PDO_SQLSRV or LDAP?
  4. Proxy transport: Does that client support the assigned HTTP proxy for Static or HTTPS proxy for Shield? An HTTPS destination and an HTTPS proxy are different settings.
  5. Ownership: Who can change application configuration, manage the destination allowlist and approve the connection requirements?

For HTTP(S) integrations, start with the applicable client recipe below. For a native protocol, keep the use case and assess that client’s proxy or tunnel support separately. A port number alone does not establish compatibility.

Native Option Secure Integration

Pantheon offers Secure Integration, formerly Pantheon Enterprise Gateway. It is a separate managed option; ask your Pantheon account or support team whether it is available for your contract and site.

Feature Pantheon Secure Integration QuotaGuard
Setup Pantheon provisions each remote resource Configure the assigned proxy in a compatible application client
Architecture Managed tunnel with a resource-specific local connection Application-controlled HTTP or SOCKS5 proxy connection, subject to client support
Source addresses Consistent IP address range Assigned pair of static IPs
Application configuration Code uses the provisioned resource connection Code or client settings select the proxy
Availability Confirm with Pantheon Depends on the application client and platform requirements
Pricing Confirm with Pantheon See current QuotaGuard plans

Secure Integration does not automatically redirect every request from a site. It requires remote-resource configuration and application changes. QuotaGuard likewise affects only requests made through the configured client. Native database or LDAP requirements may be a reason to assess Pantheon’s managed option rather than reuse an HTTP recipe.

For standard application-client configuration, QuotaGuard offers self-service signup and setup: select a plan online, register, and configure compatible clients without asking support to provision each external service. Dedicated provisioning and special connection requirements may still need support. The destination owner must still approve and maintain its own allowlist.

Getting Started

After creating a QuotaGuard account, open the dashboard and identify the subscription’s product, complete proxy connection URL and assigned IP pair. Copy the supplied scheme, hostname and port rather than building a URL from another subscription’s details.

Typical connection formats are:

Static: http://USERNAME:PASSWORD@ASSIGNED_PROXY_HOST:9293
Shield: https://USERNAME:PASSWORD@ASSIGNED_PROXY_HOST:9294

These are formats, not credentials or universal hostnames. A Static connection does not become a Shield connection by changing its scheme or port.

Choose the Proxy Region

Pantheon documents US, Australia, Canada and EU site regions. Check the actual site region in its dashboard, then consider the external service’s location and any residency requirements when choosing an available QuotaGuard region. Confirm regional availability with QuotaGuard; do not assume every subscription can be moved without changing connection details. Pantheon regions · QuotaGuard dedicated proxy regions

Find and Allowlist Both Static IPs

Add both addresses displayed for the subscription to the external service’s allowlist. A shared subscription may use the same pair as another subscription. If your requirements include exclusive addresses, arrange dedicated provisioning with QuotaGuard and use the connection details supplied for that service. Shared and dedicated IPs

Store Credentials with Pantheon Secrets

Store the complete connection URL as a Pantheon secret named quotaguard_proxy_url, using the runtime type and web scope for PHP access. Pantheon Secrets is available to all users. Use environment overrides where credentials differ between environments; secrets are not automatically ordinary environment variables. Pantheon documents a cache period of up to 15 minutes for changes. Create secrets · Read secrets in PHP

The following shared setup is used by the examples on this page. Save it as qg-proxy.php in your application code and load it using the correct application-relative path. It contains no credential values and may be committed with your code. Load it only after Pantheon’s secret function is available; the site’s developer should place it at the appropriate bootstrap point.

<?php
function qg_proxy(string $product): array
{
    $scheme = ['static' => 'http', 'shield' => 'https'][$product] ?? null;
    if (!$scheme || !function_exists('pantheon_get_secret')) {
        throw new RuntimeException('Proxy configuration unavailable.');
    }
    try {
        $url = pantheon_get_secret('quotaguard_proxy_url');
        if (!is_string($url) || preg_match('/[\x00-\x20\x7f]/', $url)) {
            throw new RuntimeException();
        }
        $p = parse_url($url);
        if (!is_array($p) || ($p['scheme'] ?? '') !== $scheme
            || !isset($p['host'], $p['port'], $p['user'], $p['pass'])
            || $p['port'] < 1 || $p['port'] > 65535
            || isset($p['query']) || isset($p['fragment'])
            || !in_array($p['path'] ?? '', ['', '/'], true)) {
            throw new RuntimeException();
        }
        $user = rawurldecode($p['user']);
        $pass = rawurldecode($p['pass']);
        if ($user === '' || $pass === '' || strpos($user, ':') !== false
            || preg_match('/[\x00-\x1f\x7f]/', $user . $pass)) {
            throw new RuntimeException();
        }
        return [
            'scheme' => $scheme, 'host' => $p['host'], 'port' => $p['port'],
            'user' => $user, 'pass' => $pass,
            'endpoint' => $scheme . '://' . $p['host'] . ':' . $p['port'],
            'url' => $scheme . '://' . rawurlencode($user) . ':'
                . rawurlencode($pass) . '@' . $p['host'] . ':' . $p['port'],
        ];
    } catch (Throwable $e) {
        throw new RuntimeException('Proxy configuration unavailable.');
    }
}

Do not print the returned array, connection URL or raw transport exceptions. If a protected integration cannot load its proxy configuration, return an appropriate application error rather than retrying directly. Loading required settings during site bootstrap can prevent the site from starting if they are missing; an integration-specific client lets you handle that failure at the integration boundary instead.

WordPress Configuration

WordPress has built-in HTTP proxy settings in wp-config.php. They affect requests that use the WordPress HTTP API and its proxy decision, including wp_remote_get() and wp_remote_post(). Plugins that use independent SDKs, cURL or other clients need their own settings.

Step 1 Edit wp config

For QuotaGuard Static, load the shared setup and define these settings before WordPress loads wp-settings.php. Check existing definitions first; do not redefine constants already supplied by your site configuration.

require_once __DIR__ . '/qg-proxy.php';
$proxy = qg_proxy('static');
if (!extension_loaded('curl')) {
    throw new RuntimeException('Required proxy transport unavailable.');
}
define('WP_PROXY_HOST', $proxy['host']);
define('WP_PROXY_PORT', $proxy['port']);
define('WP_PROXY_USERNAME', $proxy['user']);
define('WP_PROXY_PASSWORD', $proxy['pass']);
define('WP_PROXY_BYPASS_HOSTS', 'localhost');

Review bypass destinations for your site. WordPress normally bypasses localhost and its own site hostname. Only add hosts that should connect directly, and ensure a protected destination cannot match a bypass rule. Do not broadly proxy internal Pantheon traffic without reviewing its purpose. WordPress proxy configuration

Standard host and port constants configure an HTTP proxy, even for HTTPS destination URLs. For Shield, use the explicit PHP cURL or Guzzle recipe below, or a WordPress adapter that your developer has configured for an HTTPS proxy. Merely changing the port does not establish an encrypted application-to-proxy connection. Scheme-prefixed host behavior is transport-specific and should not be relied on across WordPress transports.

Step 2 Deploy to Pantheon

Commit the code and secret references, not the secret values. Review the diff, then use your established Pantheon deployment workflow from Dev to Test to Live. The exact Git branch and deployment commands depend on your project.

For example, in a standard Pantheon Git checkout with wp-config.php at the repository root and qg-proxy.php beside it:

git add wp-config.php qg-proxy.php
git diff --cached
git commit -m "Configure QuotaGuard client and secret references"
git push origin master

The staged configuration should contain calls such as pantheon_get_secret('quotaguard_proxy_url'), never the secret value. Include any separate application source files you created for the selected client. Confirm that origin is your Pantheon repository and the site uses Git connection mode. This example pushes the standard master branch to Dev; custom Git workflows and Multidev use the branch and remote appropriate to that project. After reviewing Dev, deploy Dev to Test, evaluate the integration there, then deploy Test to Live through the Pantheon dashboard. See Pantheon’s deployment pipeline.

What Gets Proxied

Eligible requests made through the configured WordPress HTTP API use its proxy settings unless a bypass or filter changes the decision. This can include external REST calls, plugin and theme update requests, and gateway requests that use that API. It does not cover incoming webhooks or every request made by every plugin.

If only one integration needs a proxy, a dedicated client is often easier to scope than a site-wide setting. WordPress also provides a pre_http_send_through_proxy filter for application-specific decisions. The developer should restrict destinations and review redirects and bypass behavior for the protected requests.

Environment Specific Configuration

You can restrict the configuration to selected Pantheon environments with PANTHEON_ENVIRONMENT. Keep the required proxy enabled in each environment that connects to an allowlisted service. A Live-only setting does not exercise that route in Dev or Test. Use Pantheon secret overrides to keep credentials separate where required.

For a Live-only WordPress route, wrap the complete Step 1 Edit wp config recipe above, including its require_once and secret lookup, in the conditional below. Keep it after Pantheon’s environment configuration has loaded and before wp-settings.php; do not define the same proxy constants elsewhere. This limits proxy use and avoids unnecessary development requests consuming the subscription’s quota when Dev does not need the protected service.

if (defined('PANTHEON_ENVIRONMENT') && PANTHEON_ENVIRONMENT === 'live') {
    // Insert the complete secret-based WordPress Static recipe here.
}

If Test or Dev also calls the allowlisted service, include that environment in the condition, configure its secret override, and test its route before deployment. Leaving the proxy disabled there can cause direct egress and failed access. Pantheon WordPress environment configuration

WooCommerce Payment Gateway Example

Determine which HTTP client the installed gateway version uses. Gateways using the WordPress HTTP API can use the configuration above; independent SDKs or custom transports need their own proxy configuration. Keep provider authentication and destination TLS verification enabled.

Use the harmless egress check under Testing Your Implementation to confirm the relevant client path. An egress check does not execute a payment or prove callback handling; use the payment provider’s supported sandbox workflow for application-level checks.

Drupal 8 and Later Configuration

Drupal’s HTTP client factory supports Guzzle configuration through settings.php. Clients obtained through the factory, including the usual \Drupal::httpClient() service, inherit those settings. Independent new GuzzleHttp\Client() instances do not. Per-client and per-request options may override inherited settings.

Step 1 Edit settings php

For Static, load qg-proxy.php from the application-relative location where you saved it, then configure the factory:

require_once __DIR__ . '/qg-proxy.php';
$proxy = qg_proxy('static');
if (!extension_loaded('curl')) {
    throw new RuntimeException('Required proxy transport unavailable.');
}
$settings['http_client_config']['proxy'] = [
    'http' => $proxy['url'],
    'https' => $proxy['url'],
    'no' => ['localhost'],
];
$settings['http_client_config']['verify'] = true;
$settings['http_client_config']['connect_timeout'] = 10;
$settings['http_client_config']['timeout'] = 30;

The http and https keys refer to destination schemes; the URL’s scheme identifies the proxy transport. Review bypasses and any inherited NO_PROXY settings. Do not allow a protected destination to bypass the proxy.

For Shield, inspect the client’s handler and use an HTTPS-proxy-capable cURL build. The dedicated Guzzle recipe below selects that handler explicitly without replacing Drupal’s shared handler stack or middleware.

Step 2 Deploy to Pantheon

Commit only the code and secret references, then use the site’s established deployment workflow. Preserve existing settings and module-specific overrides.

Environment Specific Configuration

Apply settings to each environment that needs the proxy. Use PANTHEON_ENVIRONMENT to select environments and Pantheon Secrets overrides for their connection details. Do not let a missing configuration silently switch a protected integration to direct egress.

For a standard Drupal Git checkout whose docroot is the repository root, the deploy example is:

git add sites/default/settings.php sites/default/qg-proxy.php
git diff --cached
git commit -m "Configure QuotaGuard client and secret references"
git push origin master

This assumes the helper is beside settings.php, matching the __DIR__ recipe above. For a web/ docroot, prefix those paths with web/; adjust them if you saved the helper elsewhere, and include any separate integration source files. Stage only code and references to Pantheon Secrets. Confirm the Pantheon remote, Git connection mode and correct branch; custom workflows or Multidev may differ from origin master. Review Dev, deploy to Test for evaluation, then deploy Test to Live using the Pantheon deployment pipeline.

For Live-only Drupal proxy use, wrap the complete secret-based Step 1 Edit settings php recipe in the following conditional after Pantheon’s settings have loaded. Keep the assignments in settings.php scope so they modify $settings; do not wrap them in a function with separate local variables.

if (defined('PANTHEON_ENVIRONMENT') && PANTHEON_ENVIRONMENT === 'live') {
    // Insert the complete secret-based Drupal Static factory recipe here.
}

This avoids spending proxy quota on development traffic that does not need the external service. Include Test or Dev as well whenever it needs the allowlisted connection; configure those environments and verify their actual client routes rather than relying on a Live-only setting. The same wrapping approach applies to the Drupal 7 $conf recipe in its maintained site’s settings scope. Pantheon Drupal environment configuration

Custom Module with Guzzle

A module using the shared Drupal client can use the factory settings above. Handle failures without logging credential-bearing exception text:

try {
    $response = \Drupal::httpClient()->get('https://ip.quotaguard.com', [
        'allow_redirects' => false,
        'timeout' => 30,
    ]);
    if ($response->getStatusCode() !== 200) {
        throw new \RuntimeException();
    }
    $data = json_decode((string) $response->getBody(), true);
} catch (\Throwable $e) {
    \Drupal::logger('my_integration')->error('Protected request failed.');
    // Return an application-appropriate failure; do not retry directly.
}

For selected destinations or a separately controlled Shield connection, inject a dedicated client into the integration instead. Keep destination authentication distinct from proxy authentication.

Drupal 7 Configuration

Drupal 7 uses a different configuration format. For an existing Drupal 7 integration using its core HTTP client, the Static configuration fields are:

require_once __DIR__ . '/qg-proxy.php';
$proxy = qg_proxy('static');
$conf['proxy_server'] = $proxy['host'];
$conf['proxy_port'] = $proxy['port'];
$conf['proxy_username'] = $proxy['user'];
$conf['proxy_password'] = $proxy['pass'];
$conf['proxy_exceptions'] = array('localhost');

Do not include a URL scheme in proxy_server. This legacy setting is not a Shield recipe and does not configure native LDAP or database extensions. Confirm the actual module and PHP runtime used by the maintained site; the shared PHP helper on this page requires PHP 7.1 or later. Deploy code without secrets and apply the same environment and bypass review described above.

Direct PHP cURL Configuration

For custom PHP code, configure cURL directly. This function uses the shared qg-proxy.php setup and supports Static and Shield by selecting the appropriate proxy type. Shield requires CURLPROXY_HTTPS, the HTTPS-proxy feature in libcurl, and the proxy certificate verification options shown below.

Save this function with your application code after loading qg-proxy.php. It accepts only HTTPS URLs on the exact origin list supplied by your application, disables redirects, and does not retry directly. Keep that origin list in trusted configuration rather than accepting it from a request parameter.

function qg_request(string $url, array $origins, string $product,
    ?array $json = null): array
{
    $p = parse_url($url);
    $origin = is_array($p) && isset($p['host'])
        ? 'https://' . strtolower($p['host']) . ':' . ($p['port'] ?? 443) : '';
    if (!is_array($p) || ($p['scheme'] ?? '') !== 'https'
        || isset($p['user']) || isset($p['pass']) || isset($p['fragment'])
        || preg_match('/[\x00-\x20\x7f]/', $url)
        || !in_array($origin, $origins, true)) {
        throw new RuntimeException('Destination not permitted.');
    }
    $proxy = qg_proxy($product);
    if (!extension_loaded('curl')) {
        throw new RuntimeException('Required proxy transport unavailable.');
    }
    $shield = $product === 'shield';
    if ($shield && (!defined('CURLPROXY_HTTPS')
        || !defined('CURL_VERSION_HTTPS_PROXY')
        || !defined('CURLOPT_PROXY_SSL_VERIFYPEER')
        || !defined('CURLOPT_PROXY_SSL_VERIFYHOST')
        || !(curl_version()['features'] & CURL_VERSION_HTTPS_PROXY))) {
        throw new RuntimeException('Required proxy transport unavailable.');
    }
    $options = [
        CURLOPT_PROXY => $proxy['endpoint'],
        CURLOPT_PROXYTYPE => $shield ? CURLPROXY_HTTPS : CURLPROXY_HTTP,
        CURLOPT_PROXYUSERNAME => $proxy['user'],
        CURLOPT_PROXYPASSWORD => $proxy['pass'],
        CURLOPT_PROXYAUTH => CURLAUTH_BASIC,
        CURLOPT_NOPROXY => '',
        CURLOPT_SSL_VERIFYPEER => true,
        CURLOPT_SSL_VERIFYHOST => 2,
        CURLOPT_FOLLOWLOCATION => false,
        CURLOPT_CONNECTTIMEOUT => 10,
        CURLOPT_TIMEOUT => 30,
        CURLOPT_RETURNTRANSFER => true,
    ];
    if ($shield) {
        $options[CURLOPT_PROXY_SSL_VERIFYPEER] = true;
        $options[CURLOPT_PROXY_SSL_VERIFYHOST] = 2;
    }
    if ($json !== null) {
        $body = json_encode($json);
        if ($body === false) {
            throw new RuntimeException('Invalid request data.');
        }
        $options[CURLOPT_POST] = true;
        $options[CURLOPT_POSTFIELDS] = $body;
        $options[CURLOPT_HTTPHEADER] = [
            'Content-Type: application/json', 'Accept: application/json',
        ];
    }
    $ch = curl_init($url);
    try {
        if (!curl_setopt_array($ch, $options)) {
            throw new RuntimeException();
        }
        $body = curl_exec($ch);
        $status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);
        if ($body === false || $status < 200 || $status >= 300) {
            throw new RuntimeException();
        }
        return ['status' => $status, 'body' => $body];
    } catch (Throwable $e) {
        throw new RuntimeException('Protected request failed.');
    } finally {
        curl_close($ch);
    }
}

$result = qg_request('https://ip.quotaguard.com',
    ['https://ip.quotaguard.com:443'], 'static'); // Or 'shield'.

Proxy authentication belongs on the proxy connection, not in destination request headers. Keep both destination and, for Shield, proxy certificate verification enabled. An application using a private CA must configure trust for the correct TLS layer; do not fix a certificate error by disabling verification.

POST Request with JSON Body

The same function accepts a JSON body as its fourth argument. Use the destination’s documented authentication and expected success status in your integration; the example function accepts any 2xx response. A real POST may change external data, so use the service’s sandbox or another appropriately authorized endpoint when developing it.

$result = qg_request(
    'https://api.example.com/data',
    ['https://api.example.com:443'],
    'shield',
    ['example_field' => 'example_value']
);

Dedicated Guzzle Client for Static or Shield

This example requires your application’s Guzzle autoloader and the complete qg-proxy.php helper above. It deliberately selects the cURL handler. Load the autoloader through your application’s normal bootstrap rather than adding a second Composer installation.

require_once __DIR__ . '/qg-proxy.php';
$proxy = qg_proxy('shield'); // Use 'static' with a Static secret.
if (!extension_loaded('curl')) {
    throw new RuntimeException('Required proxy transport unavailable.');
}
$curl = [CURLOPT_NOPROXY => '', CURLOPT_SSL_VERIFYPEER => true,
    CURLOPT_SSL_VERIFYHOST => 2];
if ($proxy['scheme'] === 'https') {
    if (!defined('CURL_VERSION_HTTPS_PROXY')
        || !defined('CURLOPT_PROXY_SSL_VERIFYPEER')
        || !defined('CURLOPT_PROXY_SSL_VERIFYHOST')
        || !(curl_version()['features'] & CURL_VERSION_HTTPS_PROXY)) {
        throw new RuntimeException('Required proxy transport unavailable.');
    }
    $curl[CURLOPT_PROXY_SSL_VERIFYPEER] = true;
    $curl[CURLOPT_PROXY_SSL_VERIFYHOST] = 2;
}
$client = new \GuzzleHttp\Client([
    'handler' => \GuzzleHttp\HandlerStack::create(
        new \GuzzleHttp\Handler\CurlHandler()
    ),
    'proxy' => ['http' => $proxy['url'], 'https' => $proxy['url'], 'no' => []],
    'curl' => $curl, 'verify' => true, 'allow_redirects' => false,
    'connect_timeout' => 10, 'timeout' => 30,
]);
try {
    $response = $client->get('https://ip.quotaguard.com');
    if ($response->getStatusCode() !== 200) {
        throw new \RuntimeException();
    }
    $data = json_decode((string) $response->getBody(), true);
} catch (\Throwable $e) {
    throw new \RuntimeException('Protected request failed.');
}

For production requests, replace the fixed echo destination with an application-approved destination; do not expose an arbitrary URL parameter. Keep the explicit handler and review options that the calling code could override. Guzzle’s stream handler does not provide the same HTTPS-proxy support as its cURL handler. Guzzle proxy option

Database Connections

The HTTP client settings above do not configure native database drivers. A driver such as PDO_SQLSRV opens its own connection and has no documented HTTP proxy parameter. Pantheon’s newer runtimes include SQL Server extensions, so the presence of a driver and the availability of an appropriate proxy route are separate questions. Pantheon runtime extensions · Microsoft connection options

QGTunnel is a companion process used on other supported hosts to provide a local connection to a remote service. That companion-process setup is not available alongside a Pantheon application. If another client has explicit proxy or tunnel support, assess that client, destination protocol and platform configuration rather than assuming the CMS HTTP settings cover it.

Databases that Expose an HTTP API

If a database or an application in front of it exposes an authenticated HTTP API, call that API through a compatible configured HTTP client. Examples include Supabase REST and an application-owned API layer for SQL Server. If your integration uses a PlanetScale HTTP driver or Neon HTTP/WebSocket driver, check its current runtime and proxy requirements: a JavaScript or WebSocket example is not automatically a PHP HTTP-client recipe. Check the specific API and PHP client rather than assuming that every vendor’s HTTP or WebSocket driver uses the same transport.

An API layer is an architectural choice: its owner must implement and secure it, and the database’s allowlist applies to the API layer’s connection. The former MongoDB Atlas Data API is retired and should not be used for a new integration.

For SQL Server, concrete ways to build that API layer include Microsoft Data API builder, a small REST service, or a serverless function. Your Pantheon site calls the authenticated HTTPS endpoint through QuotaGuard; the API layer connects to the database. This lets the database accept connections from the API layer rather than from every Pantheon application container.

When You Need a Native Database Driver

Review the driver’s documented proxy options and any platform restrictions. Where the application cannot use a suitable proxy directly, options include Pantheon Secure Integration, an owner-managed API or relay, or hosting the affected component on a platform that supports the required tunnel process. Agree on who will operate any extra component before choosing that design. Do not infer a working database query from a successful proxy tunnel alone.

If you choose to host the affected component separately, start with the QuotaGuard guides for Heroku, Render, Fly.io, and Railway. Select a deployment that can run QGTunnel alongside that component; the tunnel runs there, not inside the Pantheon site.

Common Use Cases

Payment Gateway Integration

Payment APIs that require source-IP allowlisting can use a compatible configured HTTP client. Verify the actual WooCommerce or Drupal Commerce gateway module and version. Some use the CMS client; others use their own SDK. Incoming payment notifications are separate from outgoing API requests and need their own configuration.

LDAP and Active Directory Authentication

Pantheon supports LDAP consumers, but native LDAP connections do not inherit WordPress or Guzzle HTTP proxy settings. Determine whether the particular LDAP client supports the required proxy or tunnel configuration. Pantheon’s LDAP guidance describes its managed integration option for source-IP requirements. An HTTP-based identity API is another distinct application design, not a configuration switch for an LDAP extension.

External API Integrations

For CRMs, ERPs and partner APIs, keep normal API authentication and configure the client that actually makes the request. WordPress calls through wp_remote_get() can use its configured HTTP API; Drupal’s shared client can use the factory settings; independent clients use the cURL or Guzzle recipe above. Check destination TLS, redirects, timeout behavior and both assigned allowlist addresses.

For example, this WordPress request sends a partner API’s Bearer token alongside the JSON headers. It uses the Static proxy configuration above through the WordPress HTTP API. Store the destination token separately as a Pantheon runtime secret with web scope named partner_api_token; it is not your QuotaGuard proxy password. Replace the example URL with your partner’s HTTPS endpoint.

$api_key = pantheon_get_secret('partner_api_token');
if (!is_string($api_key) || $api_key === '' || preg_match('/[\r\n]/', $api_key)) {
    throw new RuntimeException('Partner API configuration unavailable.');
}

$response = wp_remote_get('https://api.example.com/v1/data', array(
    'headers' => array(
        'Authorization' => 'Bearer ' . $api_key,
        'Content-Type' => 'application/json',
    ),
    'timeout' => 30,
    'redirection' => 0,
    'sslverify' => true,
));

if (is_wp_error($response)
    || wp_remote_retrieve_response_code($response) !== 200) {
    throw new RuntimeException('Partner API request failed.');
}
$body = wp_remote_retrieve_body($response);
$data = json_decode($body, true);
if (json_last_error() !== JSON_ERROR_NONE) {
    throw new RuntimeException('Unexpected partner API response.');
}

Use the API’s documented success status and response format. The API key authenticates to the destination; WordPress supplies the proxy credentials from the earlier configuration. Handle failures in your integration without displaying secrets or raw transport errors.

SOAP Services

PHP SoapClient has its own proxy options: proxy_host, proxy_port, proxy_login and proxy_password. Host and port fields are not credential fields. Those documented options describe an HTTP proxy and do not constitute a Shield HTTPS-proxy recipe. For Shield, assess an appropriate HTTPS-proxy-capable SOAP transport, including WSDL and import retrieval as well as service calls. Keep certificate validation enabled. PHP SoapClient options

Incoming Connections and Callbacks

An outbound proxy does not change the address at which a browser, partner or webhook sender reaches your Pantheon site. QuotaGuard inbound service is a separate reverse-proxy setup. Review the inbound hostname, TLS and platform requirements separately rather than reusing outbound constants for incoming traffic.

Testing Your Implementation

Use a harmless egress check from the same client and application context that will make the protected request. https://ip.quotaguard.com returns a JSON object with an ip field. Check the HTTP status and parse that value; compare it with the subscription’s two dashboard addresses.

WordPress Test

Run this from an appropriate private administrative or development context using the configured WordPress HTTP API. Do not add an unauthenticated public diagnostic endpoint.

$response = wp_remote_get('https://ip.quotaguard.com', [
    'timeout' => 30, 'redirection' => 0, 'sslverify' => true,
]);
if (is_wp_error($response) || wp_remote_retrieve_response_code($response) !== 200) {
    throw new RuntimeException('Egress check failed.');
}
$data = json_decode(wp_remote_retrieve_body($response), true);
if (!is_array($data) || !isset($data['ip'])
    || filter_var($data['ip'], FILTER_VALIDATE_IP) === false) {
    throw new RuntimeException('Unexpected egress response.');
}
// Compare $data['ip'] with the assigned pair in your private test.

For a concrete private web invocation, save the following temporary plugin as wp-content/plugins/qg-egress-check/qg-egress-check.php (relative to your WordPress docroot). It uses the same status and IP checks above. Activate it in the intended environment, sign in with manage_options, then open Tools > QuotaGuard Egress Check, or the relative URL /wp-admin/tools.php?page=qg-egress-check. The request runs only when you submit the nonce-protected form; opening the page does not make the request.

<?php
/* Plugin Name: Temporary QuotaGuard Egress Check */
defined('ABSPATH') || exit;

function qg_wordpress_check_egress(): array
{
    $response = wp_remote_get('https://ip.quotaguard.com', [
        'timeout' => 30, 'redirection' => 0, 'sslverify' => true,
    ]);
    if (is_wp_error($response)
        || wp_remote_retrieve_response_code($response) !== 200) {
        throw new RuntimeException('Egress check failed.');
    }
    $data = json_decode(wp_remote_retrieve_body($response), true);
    if (!is_array($data) || !isset($data['ip'])
        || filter_var($data['ip'], FILTER_VALIDATE_IP) === false) {
        throw new RuntimeException('Unexpected egress response.');
    }
    return $data;
}

add_action('admin_menu', function () {
    add_management_page('QuotaGuard Egress Check', 'QuotaGuard Egress Check',
        'manage_options', 'qg-egress-check', function () {
            if (!current_user_can('manage_options')) {
                wp_die('Not permitted.');
            }
            echo '<div class="wrap"><h1>QuotaGuard Egress Check</h1>';
            if (($_SERVER['REQUEST_METHOD'] ?? '') === 'POST') {
                check_admin_referer('qg_egress_check');
                try {
                    $data = qg_wordpress_check_egress();
                    echo '<p>Observed egress IP: ' . esc_html($data['ip']) . '</p>';
                } catch (Throwable $e) {
                    echo '<p>Egress check failed. Review configuration privately.</p>';
                }
            }
            echo '<form method="post" action="'
                . esc_url(admin_url('tools.php?page=qg-egress-check')) . '">';
            wp_nonce_field('qg_egress_check');
            submit_button('Run egress check');
            echo '</form></div>';
        });
});

Compare the displayed IP privately with both dashboard addresses. This checks the configured WordPress HTTP API, not an independent plugin SDK. Ensure the proxy configuration and runtime secret are available in the environment being checked. Use the authenticated web request rather than assuming WP-CLI can read the same web-scoped secret. Deactivate and delete the plugin after the check, removing its source from the deployed code through the normal workflow. WordPress Tools pages · Nonce and capability checks

Drupal Test

Use the custom module example above through \Drupal::httpClient() and validate its decoded ip field in the same way. A test made through an independent client does not verify Drupal’s shared client, or vice versa.

For a concrete Drupal 10/11 web invocation, a temporary custom module can expose a restricted administration form. It uses the already-configured shared client after Drupal’s normal web bootstrap; it does not load a separate proxy URL or assume Drush has access to the web-scoped Pantheon secret. This example adds three files under modules/custom/qg_egress_check/, relative to the Drupal docroot (often web/).

qg_egress_check.info.yml:

name: Temporary QuotaGuard Egress Check
type: module
core_version_requirement: ^10 || ^11
package: Custom

qg_egress_check.routing.yml:

qg_egress_check.form:
  path: '/admin/config/development/qg-egress-check'
  defaults:
    _form: '\Drupal\qg_egress_check\Form\EgressCheckForm'
    _title: 'QuotaGuard Egress Check'
  requirements:
    _permission: 'administer site configuration'
  options:
    _admin_route: true
    no_cache: true

src/Form/EgressCheckForm.php:

<?php
namespace Drupal\qg_egress_check\Form;

use Drupal\Core\Form\FormBase;
use Drupal\Core\Form\FormStateInterface;
use Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException;

final class EgressCheckForm extends FormBase
{
    public function getFormId()
    {
        return 'qg_egress_check';
    }

    public function buildForm(array $form, FormStateInterface $form_state)
    {
        $form['actions']['#type'] = 'actions';
        $form['actions']['submit'] = [
            '#type' => 'submit', '#value' => $this->t('Run egress check'),
        ];
        $form['#cache']['max-age'] = 0;
        return $form;
    }

    public function checkEgress(): array
    {
        try {
            $response = \Drupal::httpClient()->get('https://ip.quotaguard.com', [
                'allow_redirects' => false, 'timeout' => 30,
            ]);
            if ($response->getStatusCode() !== 200) {
                throw new \RuntimeException();
            }
            $data = json_decode((string) $response->getBody(), true);
            if (!is_array($data) || !isset($data['ip'])
                || filter_var($data['ip'], FILTER_VALIDATE_IP) === false) {
                throw new \RuntimeException();
            }
            return $data;
        } catch (\Throwable $e) {
            throw new \RuntimeException('Egress check failed.');
        }
    }

    public function submitForm(array &$form, FormStateInterface $form_state)
    {
        if (!$this->currentUser()->hasPermission('administer site configuration')) {
            throw new AccessDeniedHttpException();
        }
        try {
            $data = $this->checkEgress();
            $this->messenger()->addStatus($this->t('Observed egress IP: @ip', [
                '@ip' => $data['ip'],
            ]));
        } catch (\Throwable $e) {
            $this->messenger()->addError($this->t('Egress check failed. Review configuration privately.'));
        }
    }
}

Deploy the source files, enable the temporary module through Extend (/admin/modules), then sign in with administer site configuration and visit /admin/config/development/qg-egress-check on that environment. Submit Run egress check; Drupal’s Form API handles form tokens, while the route and submit handler enforce the permission. The named checkEgress() method returns decoded, IP-validated data to the submit handler, which displays only the escaped IP or a generic failure. Compare that IP privately with the subscription’s assigned pair. The form makes no egress request on an ordinary page view.

This scaffold is for Drupal 10/11; maintained older Drupal applications need their developer to adapt the module to that version’s APIs. Keep the shared-client settings and secrets available in the chosen environment. Uninstall the temporary module, remove its source and rebuild routes after the check. Do not replace this restricted form with a public diagnostic controller. Drupal Form API · Routes and permissions · Pantheon Secrets in PHP

Expected Response

The response contains an IP address matching one of the two addresses assigned to your subscription. Keep both allowlisted. Repeated requests need not alternate between them, and a single successful response does not establish failover, native database behavior or an entire gateway workflow. Remove temporary diagnostic code when finished; never log connection URLs or credentials.

For example, this is an illustrative echo response using a reserved documentation address, not an address to allowlist:

{"ip":"192.0.2.10"}

Your actual response must be compared with the IP pair in your own subscription dashboard.

Latency Considerations

A proxy adds a network hop. Its effect depends on the Pantheon site, proxy region, destination, connection reuse and the external service’s response time. Choose the region using the actual route and requirements rather than assuming a fixed Pantheon data center or a guaranteed number of milliseconds.

Set suitable connection and total timeouts, reuse clients where appropriate, and keep unrelated internal traffic on its intended route. If latency changes, compare a controlled request through the same client and investigate the destination as well as the proxy. Avoid sending unnecessary production requests merely to benchmark a route.

Troubleshooting

407 Proxy Authentication Required

Check the assigned proxy host, product, username and password together. Confirm the secret is available in the intended environment and allow for Pantheon’s secret cache after changes. Do not paste credentials into support messages or logs.

Connection Timeout

Confirm the assigned host and port, client proxy support and destination availability. Static commonly uses 9293 and Shield 9294, but use the connection details assigned to your subscription. Review timeout settings and relevant service status before increasing timeouts indiscriminately.

TLS or Certificate Errors

For Shield, there are two TLS connections to assess: application to proxy, and application to HTTPS destination. Check the failing certificate chain, hostname, trust store and runtime support. Do not turn off peer or hostname verification. Provide a sanitized error category and runtime details when requesting support.

Wrong IP Address Returned

Confirm that the request uses the intended client and environment, that proxy settings are loaded before the client is built, and that no filter, per-request option or bypass rule changes the route. Check NO_PROXY and client-specific exemptions. Do not assume a browser request tests the PHP server’s outbound configuration.

Proxy Not Applied to a Specific Plugin or Module

Identify its actual client. WordPress HTTP settings do not configure every SDK; Drupal factory settings do not configure an independent Guzzle instance. Native extensions require their own transport assessment. Avoid raw exception logging because an error can contain the proxy URL.

Drupal 7 LDAP Issues

Do not assume a generic HTTP proxy patch configures native LDAP traffic. Review the installed LDAP module’s connection path and supported options, then use an appropriate native integration or explicitly supported transport.

Pantheon Environment Detection

Pantheon provides PANTHEON_ENVIRONMENT for environment-aware configuration. For example, a site can apply its proxy configuration in Test and Live:

if (defined('PANTHEON_ENVIRONMENT')
    && in_array(PANTHEON_ENVIRONMENT, ['test', 'live'], true)) {
    // Load the required proxy configuration for these environments.
}

Choose environments based on which services they access. Keep configuration code separate from secret values and preserve existing platform bootstrap behavior.

QuotaGuard Static vs QuotaGuard Shield

Feature Static Shield
Proxy transport in these HTTP client recipes HTTP proxy HTTPS proxy
HTTPS destination payload Protected by destination TLS through CONNECT Protected by destination TLS through CONNECT
Application to proxy hop CONNECT metadata and proxy authentication are not TLS encrypted Adds TLS protection to this hop
Client requirement Compatible HTTP proxy client Compatible HTTPS proxy client and TLS build
Plan and price See current pricing See current pricing

Choose the product that fits the required transport and approved architecture. Neither product alone establishes HIPAA, PCI or other compliance. A plaintext HTTP destination does not gain destination TLS simply because a proxy is used. These recipes use HTTPS destinations and preserve certificate verification. Current plans

For direct-service subscriptions billed monthly, Static starts at $19/month and Shield at $29/month. Check the current pricing page for plan limits, available billing options and current prices.

Setup Responsibilities

  • Application developer or site owner: identifies the actual client, configures proxy use and secrets, reviews bypasses and error handling, and deploys the application code.
  • Destination owner: supplies the service requirements, maintains the allowlist for both assigned addresses, and manages destination authentication and access.
  • QuotaGuard: supplies the assigned proxy connection details and supports that proxy service, including requested dedicated provisioning.
  • Pantheon: answers platform and runtime questions and handles its native Secure Integration service where applicable. If Pantheon manages your application integration, coordinate the code changes with that team; agency-managed sites should work with their own application developer.

Ready to Get Started

Get in touch or create a free trial account. Direct-service trial information explains the applicable trial; Heroku add-ons have different billing and do not offer that same direct-service free trial.

Try QuotaGuard · View Pantheon Integration Features · Contact Support


Ready to Get Started?

Get in touch or create a free trial account

Back to top ↑

Copyright © 2009 - 2026 QuotaGuard. All rights reserved.