Struct ZoneSettingId
- Namespace
- Cloudflare.NET.Zones.Models
- Assembly
- Cloudflare.NET.dll
Represents a zone setting identifier.
Zone settings control various aspects of zone behavior including security, performance, caching, and network configuration.
[JsonConverter(typeof(ExtensibleEnumConverter<ZoneSettingId>))]
public readonly struct ZoneSettingId : IExtensibleEnum<ZoneSettingId>, IEquatable<ZoneSettingId>
- Implements
- Inherited Members
Examples
// Using a known setting with IntelliSense
var setting = await zones.GetZoneSettingAsync(zoneId, ZoneSettingId.MinTlsVersion);
// Using implicit conversion from string for new/unknown settings
ZoneSettingId customSetting = "new_setting";
var result = await zones.GetZoneSettingAsync(zoneId, customSetting);
Remarks
This is an extensible enum that provides IntelliSense for known values while allowing custom values for new settings that may be added to the Cloudflare API in the future.
Use the static properties for known settings (e.g., Ssl, MinTlsVersion) or create custom values using the constructor or implicit string conversion.
Constructors
ZoneSettingId(string)
Creates a new ZoneSettingId with the specified value.
public ZoneSettingId(string value)
Parameters
valuestringThe string value representing the setting identifier.
Exceptions
- ArgumentNullException
Thrown when
valueis null.
Properties
AdvancedDdos
Advanced DDoS protection (Business/Enterprise plans only).
public static ZoneSettingId AdvancedDdos { get; }
Property Value
Remarks
Value: "on" / "off"
This setting may not be editable on all plans.
Aegis
Aegis - dedicated egress IPs for layer 7 WAF and CDN.
public static ZoneSettingId Aegis { get; }
Property Value
Remarks
Value: Editable structure.
AlwaysOnline
Always Online - serve cached content from Internet Archive if origin is offline.
public static ZoneSettingId AlwaysOnline { get; }
Property Value
Remarks
Value: "on" / "off"
Shows a cached version of your site when your origin server is unavailable.
AlwaysUseHttps
Always use HTTPS - enforce HTTPS connections.
public static ZoneSettingId AlwaysUseHttps { get; }
Property Value
Remarks
Value: "on" / "off"
When enabled, any HTTP request is redirected to HTTPS with a 301 redirect.
AutomaticHttpsRewrites
Automatic HTTPS Rewrites - automatically rewrite HTTP links to HTTPS.
public static ZoneSettingId AutomaticHttpsRewrites { get; }
Property Value
Remarks
Value: "on" / "off"
Helps fix mixed content issues by rewriting insecure URLs in HTML responses.
AutomaticPlatformOptimization
Automatic Platform Optimization (APO) settings.
public static ZoneSettingId AutomaticPlatformOptimization { get; }
Property Value
Remarks
Value: Editable structure containing APO caching and optimization settings.
Brotli
Brotli compression for supported clients.
public static ZoneSettingId Brotli { get; }
Property Value
Remarks
Value: "on" / "off"
Applies Brotli compression to speed up page load times for supported browsers.
BrowserCacheTtl
Browser cache TTL in seconds.
public static ZoneSettingId BrowserCacheTtl { get; }
Property Value
Remarks
Value: integer (seconds); 0 = respect origin headers
Specifies how long browsers should cache assets from your site.
BrowserCheck
Browser integrity check.
public static ZoneSettingId BrowserCheck { get; }
Property Value
Remarks
Value: "on" / "off"
Evaluates incoming HTTP headers against known threats and blocks malicious requests.
CacheLevel
Cache level - controls caching behavior.
public static ZoneSettingId CacheLevel { get; }
Property Value
Remarks
Value: "bypass", "basic", "simplified", "aggressive", "cache_everything"
Determines how Cloudflare caches content from your origin.
- See Also
ChallengeTtl
Challenge passage TTL in seconds.
public static ZoneSettingId ChallengeTtl { get; }
Property Value
Remarks
Value: integer (seconds)
Specifies how long a visitor can browse your site after completing a challenge. Recommended: 15-45 minutes.
Ciphers
TLS cipher suite allowlist in BoringSSL format.
public static ZoneSettingId Ciphers { get; }
Property Value
Remarks
Value: Custom cipher list (array of strings).
Allows specifying which cipher suites are permitted for TLS connections.
DevelopmentMode
Development mode - bypass cache for 3 hours.
public static ZoneSettingId DevelopmentMode { get; }
Property Value
Remarks
Value: "on" / "off"
Temporarily bypasses Cloudflare's cache to see changes immediately during development.
EarlyHints
Early Hints - HTTP 103 response with Link headers.
public static ZoneSettingId EarlyHints { get; }
Property Value
Remarks
Value: "on" / "off"
Sends HTTP 103 responses to preload assets before the main response arrives.
EmailObfuscation
Email obfuscation - hide email addresses from bots.
public static ZoneSettingId EmailObfuscation { get; }
Property Value
Remarks
Value: "on" / "off"
Obfuscates email addresses on your website to prevent harvesting by bots.
FontSettings
Cloudflare Fonts delivery optimization.
public static ZoneSettingId FontSettings { get; }
Property Value
Remarks
Value: Editable structure containing font optimization settings.
H2Prioritization
HTTP/2 Edge Prioritization optimization.
public static ZoneSettingId H2Prioritization { get; }
Property Value
Remarks
Value: "on" / "off"
Enables advanced HTTP/2 prioritization for improved performance.
HotlinkProtection
Hotlink protection - prevent image theft.
public static ZoneSettingId HotlinkProtection { get; }
Property Value
Remarks
Value: "on" / "off"
Prevents other websites from embedding images hosted on your site.
Http2
HTTP/2 protocol support.
public static ZoneSettingId Http2 { get; }
Property Value
Remarks
Value: "on" / "off"
Enables HTTP/2 protocol for visitors connecting to your site through Cloudflare.
Http3
HTTP/3 protocol support (with QUIC).
public static ZoneSettingId Http3 { get; }
Property Value
Remarks
Value: "on" / "off"
Enables HTTP/3 protocol for improved performance on unreliable networks.
ImageResizing
Image Resizing - on-demand image transformation service.
public static ZoneSettingId ImageResizing { get; }
Property Value
Remarks
Value: "on" / "off"
Allows resizing, cropping, and converting images on-the-fly.
IpGeolocation
IP geolocation header.
public static ZoneSettingId IpGeolocation { get; }
Property Value
Remarks
Value: "on" / "off"
Adds the CF-IPCountry header containing visitor's country code to requests.
Ipv6
IPv6 compatibility for subdomains.
public static ZoneSettingId Ipv6 { get; }
Property Value
Remarks
Value: "on" / "off"
Enables IPv6 support for your zone.
MinTlsVersion
Minimum TLS version requirement.
public static ZoneSettingId MinTlsVersion { get; }
Property Value
Remarks
Value: "1.0", "1.1", "1.2", "1.3"
Specifies the minimum TLS protocol version clients must support to connect.
Mirage
Mirage - image optimization for mobile devices.
public static ZoneSettingId Mirage { get; }
Property Value
Remarks
Value: "on" / "off"
Optimizes image loading for mobile visitors with slow connections.
Nel
Network Error Logging (NEL) reporting (Beta).
public static ZoneSettingId Nel { get; }
Property Value
Remarks
Value: "on" / "off"
Enables Network Error Logging for visibility into connectivity issues.
OpportunisticEncryption
Opportunistic encryption support.
public static ZoneSettingId OpportunisticEncryption { get; }
Property Value
Remarks
Value: "on" / "off"
Enables opportunistic encryption for browsers that support it.
OpportunisticOnion
Opportunistic Onion - Alt-Svc header for Tor connections.
public static ZoneSettingId OpportunisticOnion { get; }
Property Value
Remarks
Value: "on" / "off"
Adds Alt-Svc header to allow Tor connections to your website.
OrangeToOrange
Orange to Orange - CNAME to other Cloudflare zones.
public static ZoneSettingId OrangeToOrange { get; }
Property Value
Remarks
Value: "on" / "off"
Allows CNAME records pointing to other Cloudflare-proxied domains.
OriginErrorPagePassThru
Origin error page pass-through.
public static ZoneSettingId OriginErrorPagePassThru { get; }
Property Value
Remarks
Value: "on" / "off"
Passes through error pages from your origin instead of showing Cloudflare error pages.
OriginMaxHttpVersion
Maximum HTTP version to origin.
public static ZoneSettingId OriginMaxHttpVersion { get; }
Property Value
Remarks
Value: "1", "2"
Sets the maximum HTTP version Cloudflare uses when connecting to your origin.
Polish
Image optimization (Polish).
public static ZoneSettingId Polish { get; }
Property Value
Remarks
Value: "off", "lossless", "lossy"
Optimizes images by removing metadata and applying compression.
- See Also
PrefetchPreload
Prefetch Preload - prefetch URLs from response headers (Enterprise only).
public static ZoneSettingId PrefetchPreload { get; }
Property Value
Remarks
Value: "on" / "off"
Prefetches URLs specified in Link headers to improve page load times.
ProxyReadTimeout
Proxy read timeout duration in seconds.
public static ZoneSettingId ProxyReadTimeout { get; }
Property Value
Remarks
Value: integer (seconds)
Maximum time Cloudflare waits for a response from your origin.
PseudoIpv4
Pseudo IPv4 header setting.
public static ZoneSettingId PseudoIpv4 { get; }
Property Value
Remarks
Value: "off", "add_header", "overwrite_header"
Adds a pseudo IPv4 address for applications that don't support IPv6.
- See Also
ResponseBuffering
Response buffering behavior.
public static ZoneSettingId ResponseBuffering { get; }
Property Value
Remarks
Value: "on" / "off"
Controls whether Cloudflare buffers responses before sending to visitors.
RocketLoader
Rocket Loader - JavaScript optimization.
public static ZoneSettingId RocketLoader { get; }
Property Value
Remarks
Value: "on" / "off"
Improves page rendering by asynchronously loading JavaScript.
SecurityHeaders
Security headers configuration.
public static ZoneSettingId SecurityHeaders { get; }
Property Value
Remarks
Value: Editable structure containing security header settings.
SecurityLevel
Security level - controls how aggressive Cloudflare challenges visitors.
public static ZoneSettingId SecurityLevel { get; }
Property Value
Remarks
Value: "off", "essentially_off", "low", "medium", "high", "under_attack"
Higher levels challenge more visitors based on threat reputation.
- See Also
ServerSideExcludes
Server-side excludes - hide content from suspicious visitors.
public static ZoneSettingId ServerSideExcludes { get; }
Property Value
Remarks
Value: "on" / "off"
Hides specific content from visitors with a bad IP reputation.
SortQueryStringForCache
Sort query string for cache - normalize query parameters.
public static ZoneSettingId SortQueryStringForCache { get; }
Property Value
Remarks
Value: "on" / "off"
Sorts query string parameters alphabetically for improved cache hit ratio.
Ssl
SSL/TLS encryption mode.
public static ZoneSettingId Ssl { get; }
Property Value
Remarks
Value: "off", "flexible", "full", "strict"
Controls how traffic is encrypted between visitors, Cloudflare, and your origin server.
- See Also
SslRecommender
SSL Recommender - automated SSL/TLS mode recommendation emails.
public static ZoneSettingId SslRecommender { get; }
Property Value
Remarks
Value: "on" / "off"
Receives email recommendations for optimal SSL/TLS configuration.
Tls13
TLS 1.3 encryption support.
public static ZoneSettingId Tls13 { get; }
Property Value
Remarks
Value: "on", "off", "zrt" (with 0-RTT)
Enables TLS 1.3 protocol for improved security and performance.
- See Also
TlsClientAuth
TLS client certificate authentication (Enterprise only).
public static ZoneSettingId TlsClientAuth { get; }
Property Value
Remarks
Value: "on" / "off"
Requires clients to present a valid TLS certificate to connect.
TrueClientIpHeader
True-Client-IP header support.
public static ZoneSettingId TrueClientIpHeader { get; }
Property Value
Remarks
Value: "on" / "off"
Sends the visitor's original IP address to your origin in the True-Client-IP header.
Value
Gets the underlying string value of this setting identifier.
public string Value { get; }
Property Value
Waf
Web Application Firewall.
public static ZoneSettingId Waf { get; }
Property Value
Remarks
Value: "on" / "off"
Enables the Cloudflare Web Application Firewall (WAF) for the zone.
Webp
WebP image format delivery.
public static ZoneSettingId Webp { get; }
Property Value
Remarks
Value: "on" / "off"
Converts images to WebP format for browsers that support it.
Websockets
WebSocket connection support.
public static ZoneSettingId Websockets { get; }
Property Value
Remarks
Value: "on" / "off"
Enables WebSocket connections through Cloudflare.
ZeroRtt
0-RTT Connection Resumption (Zero Round Trip Time).
public static ZoneSettingId ZeroRtt { get; }
Property Value
Remarks
Value: "on" / "off"
Allows TLS 1.3 connections to resume without a round trip, reducing latency.
Methods
Create(string)
Creates a new instance of the extensible enum from the specified string value.
public static ZoneSettingId Create(string value)
Parameters
valuestringThe string value to wrap.
Returns
- ZoneSettingId
A new instance of ZoneSettingId containing the specified value.
Equals(ZoneSettingId)
Indicates whether the current object is equal to another object of the same type.
public bool Equals(ZoneSettingId other)
Parameters
otherZoneSettingIdAn object to compare with this object.
Returns
Equals(object?)
Indicates whether this instance and a specified object are equal.
public override bool Equals(object? obj)
Parameters
objobjectThe object to compare with the current instance.
Returns
- bool
true if
objand this instance are the same type and represent the same value; otherwise, false.
GetHashCode()
Returns the hash code for this instance.
public override int GetHashCode()
Returns
- int
A 32-bit signed integer that is the hash code for this instance.
ToString()
Returns the fully qualified type name of this instance.
public override string ToString()
Returns
- string
The fully qualified type name.
Operators
operator ==(ZoneSettingId, ZoneSettingId)
Determines whether two ZoneSettingId values are equal.
public static bool operator ==(ZoneSettingId left, ZoneSettingId right)
Parameters
leftZoneSettingIdrightZoneSettingId
Returns
implicit operator string(ZoneSettingId)
Implicitly converts a ZoneSettingId to its string value.
public static implicit operator string(ZoneSettingId settingId)
Parameters
settingIdZoneSettingIdThe setting identifier to convert.
Returns
implicit operator ZoneSettingId(string)
Implicitly converts a string to a ZoneSettingId.
public static implicit operator ZoneSettingId(string value)
Parameters
valuestringThe string value to convert.
Returns
operator !=(ZoneSettingId, ZoneSettingId)
Determines whether two ZoneSettingId values are not equal.
public static bool operator !=(ZoneSettingId left, ZoneSettingId right)
Parameters
leftZoneSettingIdrightZoneSettingId