Soenneker.Cloudflare.Attributes.Require 11.0.485

Prefix Reserved
dotnet add package Soenneker.Cloudflare.Attributes.Require --version 11.0.485
                    
NuGet\Install-Package Soenneker.Cloudflare.Attributes.Require -Version 11.0.485
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Soenneker.Cloudflare.Attributes.Require" Version="11.0.485" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Soenneker.Cloudflare.Attributes.Require" Version="11.0.485" />
                    
Directory.Packages.props
<PackageReference Include="Soenneker.Cloudflare.Attributes.Require" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Soenneker.Cloudflare.Attributes.Require --version 11.0.485
                    
#r "nuget: Soenneker.Cloudflare.Attributes.Require, 11.0.485"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Soenneker.Cloudflare.Attributes.Require@11.0.485
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Soenneker.Cloudflare.Attributes.Require&version=11.0.485
                    
Install as a Cake Addin
#tool nuget:?package=Soenneker.Cloudflare.Attributes.Require&version=11.0.485
                    
Install as a Cake Tool

alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image

Soenneker.Cloudflare.Attributes.Require

An ASP.NET Core authorization attribute that requires a client certificate chained to Cloudflare's Authenticated Origin Pull CA.

Installation

dotnet add package Soenneker.Cloudflare.Attributes.Require

Setup

Register the request validator:

using Soenneker.Cloudflare.Validators.Request.Registrars;

services.AddCloudflareRequestValidatorAsSingleton();

Apply the attribute to a controller or action:

using Microsoft.AspNetCore.Mvc;
using Soenneker.Cloudflare.Attributes.Require;

[ApiController]
[Route("api/orders")]
[RequireCloudflare]
public sealed class OrdersController : ControllerBase
{
    [HttpGet]
    public IActionResult Get() => Ok();
}

Requests without a valid Cloudflare Authenticated Origin Pull client-certificate chain receive 403 Forbidden.

Environment behavior

The filter is bypassed when the Environment configuration value is exactly Local or Test. It remains enforced for values such as Development, Staging, and Production. Treat that setting as security-sensitive configuration.

Deployment requirements

Enable Authenticated Origin Pulls for the Cloudflare zone and configure the origin web server or reverse proxy to request and forward the client certificate to ASP.NET Core. If TLS terminates before the application, verify that the proxy-to-application path is trusted and cannot accept spoofed certificate metadata.

This attribute is an application-layer check, not a replacement for restricting direct origin access with firewall rules, Cloudflare Tunnel, or equivalent network controls.

Product Compatible and additional computed target framework versions.
.NET net11.0 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
11.0.485 126 11/19/2026
11.0.483 55 11/18/2026
11.0.482 51 11/18/2026
11.0.481 54 11/18/2026
11.0.479 57 11/18/2026
11.0.478 49 11/18/2026
11.0.477 121 11/15/2026
11.0.476 88 11/15/2026
11.0.475 94 11/14/2026
11.0.474 160 11/11/2026
11.0.473 98 11/11/2026
11.0.472 96 11/11/2026
11.0.471 93 11/11/2026
11.0.470 102 11/11/2026
11.0.469 88 11/11/2026
11.0.468 91 11/11/2026
11.0.467 90 11/11/2026
11.0.466 98 11/11/2026
11.0.465 101 11/11/2026
11.0.464 272 11/3/2026
Loading failed

Updated Soenneker.Cloudflare.Validators.Request to 11.0.471