Back to Cloudflare

Protect the Origin Behind the Proxy

November 4, 2026 Updated November 5, 2026 Wasil Zafar 26 min read

Close bypass paths and preserve a trustworthy client identity

Table of Contents

  1. How a Discovered Origin Bypasses Edge Policy
  2. Network Restrictions and Authenticated Origin Pulls
  3. Outbound Tunnels and Public Origins
  4. Which Proxy Headers Your Application Can Trust
  5. Harden a Test Origin and Its Header Trust Settings
  6. Show That an Unapproved Direct Path Is Denied

How a Discovered Origin Bypasses Edge Policy

A venue can hire a door team, check every guest against a list, and search every bag. If the loading bay at the back is propped open, the door policy is still real, but it is no longer a security boundary. Anyone who finds the bay walks into the same room without passing the check.

That is the shape of a direct-to-origin bypass. Suppose the shop hostname sits on a public address, the team enables the orange cloud, turns on managed WAF rules, rate-limits the login route, and adds a bot rule. The origin still listens on that address, so none of the edge policy reaches it.

The address itself is the leak. Historical DNS records, forgotten staging or DNS-only records, certificate transparency logs, and internet-wide scanning can each surface it.

The attacker only needs the address. A login request goes straight to the origin with a spoofed CF-Connecting-IP attached. No edge product sees it: the WAF log stays empty, the rate limit never increments, and any application rule that trusts the header now sees the attacker's value as the client.

Some terms make the rest of this article easier:

  • The origin is the server or service that holds your application and data. Cloudflare does not own it.
  • The edge is Cloudflare's anycast network, where TLS terminates, WAF rules run, and cache lives.
  • A direct-to-origin bypass is a request that reaches the origin without traversing the edge.
  • A trusted hop is a proxy whose additions to a request you can identify and verify.

The proxy hides the address; it does not erase it. Cloudflare recommends rotating origin IPs after onboarding because historical DNS records persist, auditing DNS-only records, and avoiding mail on the same server, since bounces reveal the address (Protect your origin server). Certificate transparency, forgotten subdomains, and scanning add more paths.

Figure 1 separates the inspected path from the uninspected one.

How a Discovered Origin Bypasses Edge Policy
%%{init: {'theme':'base','themeCSS':'.edgeLabel .label text, .edgeLabel text, .edgeLabel span { fill:#132440 !important; color:#132440 !important; }','themeVariables': {'primaryColor':'#16476A','primaryTextColor':'#ffffff','primaryBorderColor':'#132440','secondaryColor':'#3B9797','secondaryTextColor':'#ffffff','secondaryBorderColor':'#132440','tertiaryColor':'#c4873b','tertiaryTextColor':'#132440','tertiaryBorderColor':'#132440','lineColor':'#5a6e82','textColor':'#132440','titleColor':'#132440','mainBkg':'#16476A','nodeBorder':'#132440','clusterBkg':'#eef3f7','clusterBorder':'#132440','edgeLabelBackground':'#ffffff','actorBkg':'#16476A','actorTextColor':'#ffffff','actorBorder':'#132440','activationBkgColor':'#3B9797','activationBorderColor':'#132440','signalColor':'#5a6e82','signalTextColor':'#132440','noteBkgColor':'#c4873b','noteTextColor':'#132440','noteBorderColor':'#132440','labelBoxBkgColor':'#a8dede','labelBoxBorderColor':'#132440','labelTextColor':'#132440','loopTextColor':'#132440','altBackground':'#f8f9fa','fontFamily':'DM Sans, sans-serif'}}}%%
flowchart TD
    subgraph PUB["Public network"]
        V["Visitor with a normal browser"]
        X["Attacker who learned the origin IP"]
    end
    subgraph EDGE["Cloudflare edge: policy lives here"]
        W["WAF, bot rules, rate limits"]
        P["Proxy sets CF-Connecting-IP"]
    end
    subgraph ORIG["Origin: no policy unless you add one"]
        G{"Ingress check"}
        A["Application reads headers"]
        L["Response served"]
        D["Connection dropped"]
    end
    V -->|"DNS answers with a Cloudflare IP"| W
    W --> P
    P -->|"Cloudflare source address"| G
    X -->|"direct to 203.0.113.10 plus a spoofed header"| G
    G -->|"no check, or source allowed"| A
    G -->|"source or certificate rejected"| D
    A --> L
    N["No WAF log, no rate limit, no bot score"]
    X -.-> N
    classDef primary fill:#132440,color:#ffffff,stroke:#0b172b;
    classDef secondary fill:#16476A,color:#ffffff,stroke:#0f314a;
    classDef ok fill:#3B9797,color:#ffffff,stroke:#2a6f6f;
    classDef danger fill:#BF092F,color:#ffffff,stroke:#7a0420;
    classDef warn fill:#c4873b,color:#132440,stroke:#8a5a1f;
    class W,G primary;
    class V,P,A secondary;
    class L ok;
    class X,D,N danger;

The important node is the origin's ingress decision. If that decision is "accept anything," the edge is a convenience, not a control.

Figure 2 draws the same gap as layers: public network, edge, origin.

A direct path around the edge reaches the same origin A visitor follows the inspected path through Cloudflare, where WAF and rate limits run. An attacker who learns the origin address takes a direct path that never enters the edge. If the origin ingress check is absent or permissive, both paths reach the application, and a spoofed CF-Connecting-IP becomes the recorded client. Public network Visitor normal browser Attacker knows 203.0.113.10 spoofs a header Cloudflare edge WAF, bot rules rate limits sets CF-Connecting-IP Origin Ingress check firewall + client cert Application reads the header HTTPS TLS + HTTP direct path: edge policy is never consulted spoofed header Both paths meet at the origin. The edge only governs the path that enters it.

Network Restrictions and Authenticated Origin Pulls

Four controls are commonly used to close the bypass, and they prove different things. They are often described as alternatives; in production they are layers.

A network allowlist accepts TCP 443 only from Cloudflare's published ranges, denying everything else. It is cheap, available on every plan, and needs no application change. Cloudflare publishes the ranges at https://www.cloudflare.com/ips/ and through its API, and recommends allowing them so legitimate proxied traffic is not blocked (Cloudflare IP addresses). The weakness is identity: the ranges are shared by every proxied hostname, so an allowlisted packet proves it came from Cloudflare's network, not from your zone. Cloudflare calls the control moderately secure and notes that it is vulnerable to IP spoofing.

Authenticated Origin Pulls (AOP) is mutual TLS on the edge-to-origin leg. Cloudflare presents a client certificate during the TLS handshake, and the origin verifies it against a CA you configure. It is not visitor mTLS, and it does not identify the user. AOP requires Full or higher; it does nothing in Off or Flexible, and it is not compatible with Cloudflare Tunnel (Authenticated Origin Pulls).

AOP has three independent levels:

  • Global uses a Cloudflare-provided certificate shared across all accounts, applies to all proxied traffic on the zone, and proves only that a request came from the Cloudflare network.
  • Zone-level uses your certificate for all proxied traffic in the zone, including SaaS custom hostnames, and proves Cloudflare used your certificate.
  • Per-hostname uses your certificate for named hostnames and takes precedence. It is the right tool when hostnames need different proofs.

Check the entitlement before you depend on the level. The AOP overview lists the feature on Free, Pro, Business, and Enterprise, but per-level entitlements can differ, so confirm the level you need in the dashboard.

The origin has to request and verify the certificate. nginx uses two directives; Apache needs SSLCACertificateFile and SSLVerifyClient require.

# Require a client certificate on the origin's TLS listener.
ssl_client_certificate /path/to/cloudflare-aop-ca.pem;
ssl_verify_client on;
# Reload only after the config test passes.
nginx -t
systemctl reload nginx

Enforce in two passes. Roll out with the optional form first, confirm the certificate in logs, then switch to required. Cloudflare's AOP expiration alert can fire 30 and 14 days before a custom certificate expires; enable it, because one expired certificate can break every hostname that uses it.

Cloudflare Tunnel inverts the connection. cloudflared opens outbound-only connections to Cloudflare, so the origin needs no public IP and no inbound listener (Cloudflare Tunnel). AOP has no effect on a tunneled hostname because there is no inbound TLS listener; connector credentials authenticate the path. This is the strongest anti-bypass shape because there is no public socket to find. The tradeoff is a new critical dependency: if every connector is down, the hostname is down.

Dedicated egress IPs, available with Smart Shield Advanced on Enterprise, reserve a small set of egress addresses for your account so the origin allowlist can be much tighter (Smart Shield). They reduce the allowlist's blast radius but still do not identify a user.

The comparison in the table is about what each control proves, not which one is "best."

ControlWhat it provesWhere enforcedAvailability (Nov 2026)Typical failure
Cloudflare IP allowlistThe packet came from Cloudflare's shared networkOrigin firewall or security groupAll plansA stale list drops real traffic; another Cloudflare customer still qualifies
Global AOPA Cloudflare-wide client certificate was presentedTLS handshake at the originAll plansProves the network, not your account
Zone-level AOPYour certificate was presented for any proxied hostnameTLS handshake at the originAOP listed on all plansOne certificate also covers SaaS hostnames; expiry affects the zone
Per-hostname AOPYour certificate was presented for named hostnamesTLS handshake at the originAOP listed on all plansSibling hostnames can be left on a weaker level
Cloudflare TunnelTraffic arrived over your connectorConnector and CloudflareAll plansA connector outage takes the hostname down
Dedicated egress IPsTraffic came from addresses reserved for your accountOrigin firewallEnterprise (Smart Shield Advanced)A smaller list is still only a network claim

The boundary is the hostname and the ingress path, not the toggle. Take a zone with three names: the shop hostname, the API hostname, and a SaaS custom hostname. Each scope draws a different line.

Scope appliedCoversLeaves on a weaker proof
Per-hostname AOP on the shopThe shop hostname onlyThe API hostname can still accept the global certificate
Zone-level AOPEvery proxied hostname plus the SaaS custom hostnameA partner's hostname inherits your certificate and its expiry
Tunnel for the shopThe shop hostname, with no inbound TLS listenerAOP is irrelevant there; connector credentials prove the path

Zone-level coverage may be exactly what you want, or exactly what breaks a partner.

Figure 3 puts the decisions in the order they must run.

Network Restrictions and Authenticated Origin Pulls
%%{init: {'theme':'base','themeCSS':'.edgeLabel .label text, .edgeLabel text, .edgeLabel span { fill:#132440 !important; color:#132440 !important; }','themeVariables': {'primaryColor':'#16476A','primaryTextColor':'#ffffff','primaryBorderColor':'#132440','secondaryColor':'#3B9797','secondaryTextColor':'#ffffff','secondaryBorderColor':'#132440','tertiaryColor':'#c4873b','tertiaryTextColor':'#132440','tertiaryBorderColor':'#132440','lineColor':'#5a6e82','textColor':'#132440','mainBkg':'#16476A','nodeBorder':'#132440','clusterBkg':'#eef3f7','clusterBorder':'#132440','edgeLabelBackground':'#ffffff','actorBkg':'#16476A','actorTextColor':'#ffffff','actorBorder':'#132440','activationBkgColor':'#3B9797','activationBorderColor':'#132440','signalColor':'#5a6e82','signalTextColor':'#132440','noteBkgColor':'#c4873b','noteTextColor':'#132440','noteBorderColor':'#132440','labelBoxBkgColor':'#a8dede','labelBoxBorderColor':'#132440','labelTextColor':'#132440','loopTextColor':'#132440','altBackground':'#f8f9fa','fontFamily':'DM Sans, sans-serif'}}}%%
flowchart TD
    R["Request to origin port 443"] --> T{"Ingress path"}
    T -->|"Tunnel connector"| K["Connector credential checked"]
    K --> H
    T -->|"Public IP"| S{"Source in current Cloudflare ranges?"}
    S -->|"no"| D1["Drop at firewall"]
    S -->|"yes"| C{"AOP client certificate valid?"}
    C -->|"no"| D2["Reject TLS handshake"]
    C -->|"yes"| H{"CF-Connecting-IP present and single-valued?"}
    H -->|"no"| D3["Reject at application"]
    H -->|"yes"| OK
    D1 -.->|"a stale list also drops real visitors"| HC["Health check alarm"]
    D2 -.-> HC
    classDef primary fill:#132440,color:#ffffff,stroke:#0b172b;
    classDef secondary fill:#16476A,color:#ffffff,stroke:#0f314a;
    classDef ok fill:#3B9797,color:#ffffff,stroke:#2a6f6f;
    classDef danger fill:#BF092F,color:#ffffff,stroke:#7a0420;
    classDef warn fill:#c4873b,color:#132440,stroke:#8a5a1f;
    class R,T,S primary;
    class K,H,HC secondary;
    class C ok;
    class D1,D2,D3 danger;

The order matters. The tunnel branch proves the path with connector credentials instead of a client-certificate handshake. The public branch checks source, then certificate, then header. Both branches end at the header check, because passing either ingress test does not make a client-supplied header true. A request that fails an earlier check must not reach a later one.

Outbound Tunnels and Public Origins

Tunnel changes the shape of the problem, not the header rules. A tunneled origin can sit on a private network with no inbound firewall exception at all. A public origin keeps its address, so it needs the allowlist and the certificate.

For a public origin, the sequence is: deny all inbound except the published ranges, require a custom AOP certificate, and only then read CF-Connecting-IP. Each step answers a different question. The firewall answers "did this packet come from Cloudflare?" AOP answers "did it come from Cloudflare with my certificate?" The header answers "which address did Cloudflare see?" None of them answers "who is the user?" The durable design uses all three layers; each answers a question the others cannot.

Trust is per hop, not per header name

If a request reaches Cloudflare through another proxy, CF-Connecting-IP is that proxy's address, not necessarily the visitor's. Cloudflare appends the connecting proxy's address to X-Forwarded-For, and the leftmost entries are client-supplied. The Enterprise-only True-Client-IP header must be enabled through a Managed Transform, and Cloudflare warns it can be spoofed in a stacked CDN if the upstream does not add it (Cloudflare HTTP headers). The question is which hop wrote the value, and whether you can prove that hop is yours.

The operational consequences differ. Tunnel removes allowlist maintenance but makes connector health a first-class dependency; run at least two connectors and monitor them. A public origin keeps the allowlist and adds certificate lifecycle. Both need a metric for application-level header rejection, because a sudden rise means the path changed or the parser is wrong.

Health checks sit on the same path. Standalone checks run from Cloudflare's edge and are now part of Smart Shield (Health Checks). If the origin firewall allows only a hand-maintained list, a missing range can make a healthy origin look down; Cloudflare's Spectrum troubleshooting documents the analogous failure, where an IP allowlist blocks its own probes. Test the exact probe path, not just a browser request.

Here is a composite scenario, not a named incident. A team copies the Cloudflare ranges into a cloud security group during onboarding and never revisits them. Eighteen months later a new range is in production. Requests from one region time out, the load balancer marks the origin unhealthy, and 521 and 522 alerts fire in bursts. The origin is fine; the allowlist is stale. The fix is a five-minute rule change, but detection took an hour because on-call was reading application dashboards.

Treat the allowlist as data, not a one-time copy

Fetch the ranges from the API, diff them, alert on drift, and keep an out-of-band management path. A hand-maintained list drifts silently, and a missed range makes a healthy origin look down.

Rotation is not finished when the new address works

Rotating the origin IP after onboarding has a similar trap: rotation is not complete until the old address stops answering. A firewall rule on the new address and an open listener on the old one is a bypass with extra steps.

Which Proxy Headers Your Application Can Trust

A header is a claim, not a fact. The name tells you who is supposed to have written it; only the topology tells you who could have written it.

HeaderWhat it carriesTrust it when
CF-Connecting-IPOne address, set on the edge-to-origin hop onlyThe connection provably came from Cloudflare
True-Client-IPThe same value, for legacy devicesYou enabled the Managed Transform and know the upstream
X-Forwarded-ForA list; Cloudflare appends the proxy it sawYou know the exact hop count and control every hop
X-Real-IPStripped when no Worker subrequest is involvedYour own edge sets it; otherwise ignore
ForwardedNot set by Cloudflare's HTTP proxyYour own edge sets it; otherwise ignore

The forwarded list is a list, not an identity. If absent, Cloudflare sets it equal to the connecting address; if present, Cloudflare appends the address of the proxy connecting to Cloudflare. A visitor behind proxies A and B produces 203.0.113.1,198.51.100.101,198.51.100.102: the last value is proxy B, the address Cloudflare saw, and the leftmost is the visitor's claim.

Log a single-address header. CF-Connecting-IP and True-Client-IP each contain one address (Restoring original visitor IPs).

The rule is narrow. Trust a header only after you can prove the peer that wrote it, and prefer the single-address headers for logs and rate limits. A hop count you cannot verify is an assumption, not a control.

Worker subrequests are a separate trust domain. In a same-zone subrequest, CF-Connecting-IP reflects a value the Worker can change; cross-zone subrequests receive 2a06:98c0:3600::103. For a non-Cloudflare destination, the Worker controls both headers, so trust the header only as far as you trust the Worker code and its route.

Frameworks have a proxy-trust switch, and the permissive setting is wrong here. Trusting every hop makes the forwarded list spoofable. Set the switch to the published ranges or to a precise hop count; the snippets show one range, so load the full list.

// Express: a precise hop count, not trust proxy true.
app.set("trust proxy", 1);
# Trust only peers in the published ranges.
set_real_ip_from 173.245.48.0/20;  # one range; load the full list
real_ip_header CF-Connecting-IP;

Apache uses the RemoteIPHeader and RemoteIPTrustedProxy directives. Caddy's documented example matches the remote IP against the ranges and rewrites the forwarded list from the Cloudflare header, warning that the header is spoofable without that check.

If a load balancer terminates TLS in front of the application, the application's peer is the load balancer, not Cloudflare. The load balancer must enforce AOP, or be the tunnel endpoint, and pass a header it controls. Otherwise the application trusts a value from an unverified peer; the trust boundary is the TLS terminator, not the box running the code.

Whatever the framework, the application should enforce a small set of invariants:

  1. The header must be present and non-empty.
  2. CF-Connecting-IP must contain exactly one address; reject commas and malformed values.
  3. Reject loopback, link-local, and private addresses as visitor identities unless the request is internal.
  4. Cross-check the socket peer; if it is untrusted, ignore the header and use the peer, or reject.
  5. Log peer and claimed client separately; alert on an unexplained mismatch.
  6. Validate Host; per-hostname AOP and vhost routing must agree.
  7. Never use the client IP as the only authorization factor.

Two boundary conditions rewrite or weaken the address

If Pseudo IPv4 is set to Overwrite Headers, Cloudflare replaces CF-Connecting-IP with a synthetic IPv4 and preserves the real IPv6 in CF-Connecting-IPv6; rules that assume the header is real will be wrong for IPv6 visitors. And because carrier-grade NAT and mobile networks share addresses, an IP is a weak identity even when accurate.

Figure 4 shows the before and after.

Before and after locking the origin and reading one trusted header Before, the origin has two entrances: the edge and a direct client that spoofs CF-Connecting-IP. The application logs the spoofed value and an admin allowlist passes. After, the origin accepts only Cloudflare ranges with a client certificate, and the application reads one address while ignoring X-Forwarded-For. The direct client is blocked. Before: two entrances After: one authenticated entrance Cloudflare edge sets the header Direct client spoofs the header Origin no ingress check app trusts header logs 10.0.0.5 admin rule passes two entrances, one identity Cloudflare edge sets the header Direct client spoofs the header Origin CF ranges + mTLS app reads one IP rejects commas ignores XFF mTLS blocked The header is only meaningful after the origin proves which hop connected.

The difference is not a better header name. It is that the origin can prove which hop connected before it reads any header.

Harden a Test Origin and Its Header Trust Settings

Build the local fixture first; the exercise below assumes these files exist.

# Lab CA
openssl req -x509 -newkey rsa:2048 -nodes -keyout lab-ca.key -out lab-ca.crt -days 2 -subj "/CN=Lab AOP CA"
# Origin key and CSR, then sign with the lab CA and a SAN for origin.test
openssl req -newkey rsa:2048 -nodes -keyout origin.key -out origin.csr -subj "/CN=origin.test"
# Client key and CSR, then sign with the lab CA
openssl req -newkey rsa:2048 -nodes -keyout client.key -out client.csr -subj "/CN=cloudflare-aop"
# The lab listener requires a certificate signed by the lab CA.
ssl_client_certificate /etc/nginx/lab-ca.crt;
ssl_verify_client on;
Guided exercise

Harden a Test Origin and Its Header Trust Settings

Execution status: design-only. No Cloudflare zone, origin, or certificate was provisioned, and none of the commands below was run. Expected results are documented behavior, not measurements.

Prerequisites. A disposable Linux host or container with nginx, OpenSSL, and curl; a domain on Cloudflare for the hosted half; out-of-band console access so a firewall mistake cannot lock you out. The fixture simulates the Cloudflare-to-origin leg with a private CA; the hosted half uses real AOP.

  1. Verify both certificates. openssl verify -CAfile lab-ca.crt origin.crt and the same check for client.crt should report OK.
  2. Start nginx on 8443 with the origin certificate and ssl_verify_client on. Add a /whoami handler that returns the socket peer and the raw CF-Connecting-IP. Request https://origin.test:8443/whoami with --resolve origin.test:8443:127.0.0.1 and no client certificate: the handshake should fail (curl commonly reports alert certificate required or a handshake error). Repeat with --cert client.crt --key client.key: expect 200. This is the AOP analogue.
  3. Send curl --resolve origin.test:8443:127.0.0.1 --cert client.crt --key client.key -H "CF-Connecting-IP: 203.0.113.9" https://origin.test:8443/whoami. Expected: peer 127.0.0.1, raw header .9. If the handler reports .9 as the client IP, it trusts a header from an unauthenticated peer. Fix it to use the header only when the peer is the lab proxy, then repeat.
  4. Start a second listener on 8080 without mTLS. A direct request returns 200, which is the bypass. Bind it to loopback for the rest of the exercise, or remove it; a request from another host should then be refused.
  5. Hosted half, design-only: upload a zone-level custom AOP certificate, install its CA at the origin, set ssl_verify_client on, and enable the zone-level toggle. From a non-Cloudflare host, curl --resolve shop.example.com:443:<origin-ip> https://shop.example.com/ should fail TLS or time out, not return 200. Through the public hostname, expect 200 and cf-ray.
  6. Restrict port 443 to the published Cloudflare ranges. From outside the list, expect a timeout. Confirm the health check is still green; if red, the probe path is not covered.
  7. Through the edge, send -H "CF-Connecting-IP: 203.0.113.9". The origin should record the address Cloudflare observed, not .9.

Failure checks. A direct request returning 200 means the bypass is open. A direct TLS handshake succeeding without a client certificate means AOP is not enforced. An application log showing the spoofed value means the header is trusted before the peer is verified. Intermittent 5xx after a range change points at a stale allowlist. A red health check after tightening the firewall means the probe path was not included.

Cost. Domain registration is typically USD 10–15 per year at writing time; origin compute and egress are the variable costs. This article did not verify invoicing for AOP or Tunnel, so treat their price as contract-specific rather than assuming zero.

Cleanup. Stop both listeners, delete the lab CA and certificates, disable the AOP toggle, remove the firewall rules, and restore the previous DNS and TLS settings. Keep the out-of-band path until the public path is confirmed.

The exercise separates three questions: did the TLS handshake succeed, did the origin accept the connection, and did the application read the identity from the right hop? A 200 from the direct listener answers the third question with a failure.

Show That an Unapproved Direct Path Is Denied

The evidence is a set of observations, not a feeling that the dashboard looks right. Record all five; one failure invalidates the control even if the others pass.

  • Direct path. curl -sSI --resolve shop.example.com:443:203.0.113.10 https://shop.example.com/ should return a TLS error, timeout, or 403. A 200 from the origin is a fail, even if the body would be an error page.
  • Edge path. curl -sSI https://shop.example.com/ should return server: cloudflare and a cf-ray, and the origin log should show the same cf-ray.
  • Header integrity. Send -H "CF-Connecting-IP: 203.0.113.9" through the edge. The origin should record the address Cloudflare observed, not .9. If the audit log or rate limiter uses .9, fail.
  • AOP. Without a client certificate, openssl s_client -connect 203.0.113.10:443 -servername shop.example.com should fail the handshake. In the fixture, the same request with the lab client certificate should succeed.
  • Health and range drill. The health check should be green after the allowlist change, a request from a non-listed address should be denied, and removing one range in a lab should alert before a customer report.

Pass/fail summary. Pass means the direct path is denied, the edge path works, the application records the address Cloudflare observed, and the health check survives the lockdown. Fail means any direct request returns application content, any spoofed value reaches the audit log, or the only way to keep the site up is to leave the origin open.

Self-check.

  1. The orange cloud is on. Is the origin hidden? No. DNS returns Cloudflare addresses, but the origin still listens. Historical DNS, DNS-only records, certificate transparency, and scanning can reveal it. Rotate and restrict.
  2. Does AOP prove the visitor's identity? No. It proves Cloudflare presented your client certificate. Visitor identity is still a header claim, usable only after the path is locked.
  3. Which header should the application read? CF-Connecting-IP, or True-Client-IP on Enterprise, as a single value after peer verification. Use X-Forwarded-For only with a known hop count, and never take the leftmost entry.
  4. Why not stop at a Cloudflare IP allowlist? The ranges are shared. Another Cloudflare customer's request can originate from them. A custom AOP certificate or Tunnel adds a stronger path proof.
  5. Is global AOP enough for account-specific assurance? No. Its certificate is shared across all Cloudflare accounts and proves only the network. Use a custom certificate.

Unresolved limitations. No Cloudflare zone or origin was provisioned, so there are no hosted measurements. AOP, Tunnel, Smart Shield dedicated egress, and the health-check path were not exercised. Stacked-CDN and Worker-subrequest behavior is documented but untested here. Plan entitlements, limits, and prices change; verify them at build time. Pseudo IPv4 and IPv6 identity were not tested. A TLS-terminating load balancer between Cloudflare and the application would move the trust boundary and was not modeled. Tested versions: none. Verification date: 2026-11-04.

References (verified 2026-11-04):

  • Protect your origin server: https://developers.cloudflare.com/fundamentals/security/protect-your-origin-server/
  • Cloudflare IP addresses: https://developers.cloudflare.com/fundamentals/concepts/cloudflare-ip-addresses/
  • Cloudflare HTTP headers: https://developers.cloudflare.com/fundamentals/reference/http-headers/
  • Restoring original visitor IPs: https://developers.cloudflare.com/support/troubleshooting/restoring-visitor-ips/restoring-original-visitor-ips/
  • Authenticated Origin Pulls: https://developers.cloudflare.com/ssl/origin-configuration/authenticated-origin-pull/
  • Global AOP: https://developers.cloudflare.com/ssl/origin-configuration/authenticated-origin-pull/set-up/global/
  • Zone-level AOP: https://developers.cloudflare.com/ssl/origin-configuration/authenticated-origin-pull/set-up/zone-level/
  • Per-hostname AOP: https://developers.cloudflare.com/ssl/origin-configuration/authenticated-origin-pull/set-up/per-hostname/
  • Full (strict) mode: https://developers.cloudflare.com/ssl/origin-configuration/ssl-modes/full-strict/
  • Cloudflare Tunnel: https://developers.cloudflare.com/cloudflare-one/networks/connectors/cloudflare-tunnel/
  • Tunnel for public applications: https://developers.cloudflare.com/tunnel/
  • Health Checks: https://developers.cloudflare.com/health-checks/
  • Spectrum troubleshooting (health checks and IP allowlists): https://developers.cloudflare.com/spectrum/reference/troubleshooting/
  • Smart Shield: https://developers.cloudflare.com/smart-shield/
  • Managed Transforms: https://developers.cloudflare.com/rules/transform/managed-transforms/
  • Cloudflare IP list API: https://developers.cloudflare.com/api/resources/ips/methods/list/

Next in the Series

In Change Requests With the Modern Rules Engine, we'll explore Choose redirects, rewrites, origin settings, or code deliberately.