Class ContentOptions
This option can be configured by code or with appsettings.json on location "Quilt4Net/Content"
public record ContentOptions : IEquatable<ContentOptions>
- Inheritance
-
ContentOptions
- Implements
- Inherited Members
Properties
AdminRoles
Roles that grant content admin access (edit, debug, reload). Checked against the authenticated user's claim roles (e.g. Entra ID). Default is ["ContentAdmin", "Developer"].
public string[] AdminRoles { get; set; }
Property Value
- string[]
ApiKey
Api key to be used for calls to the server. This key can be retrieved from https://quilt4net.com/.
public string ApiKey { get; set; }
Property Value
Application
Name of the application that will be used in Quilt4Net. Default is the name of the assembly.
public string Application { get; set; }
Property Value
AssumeAdmin
When true, always grant content admin access regardless of authentication state. Useful during development when no identity provider is configured. Default is false.
public bool AssumeAdmin { get; set; }
Property Value
FailureCacheDuration
Duration to cache the stale or default value when an API call fails (e.g. server unreachable, invalid API key). Only used when no prior successful response TTL is available. Default is 10 minutes (matching the server's default content TTL).
public TimeSpan FailureCacheDuration { get; set; }
Property Value
HttpTimeout
Timeout for HTTP calls to the Quilt4Net server. Default is 5 seconds. When a stale cached value exists and StaleWhileRevalidate is enabled, the caller gets the stale value immediately and the refresh happens in the background, so this timeout only blocks when no cached value exists. When StaleWhileRevalidate is disabled, an expired entry is refreshed synchronously and this timeout applies to that call.
public TimeSpan HttpTimeout { get; set; }
Property Value
Quilt4NetAddress
Address to the Quilt4Net server.
Default is https://quilt4net.com/. Defaulted on the type so an unbound
IOptions<ContentOptions> still carries a usable URL when only
part of the toolkit is registered (e.g. AddQuilt4NetRemoteConfiguration
without AddQuilt4NetContent).
public string Quilt4NetAddress { get; set; }
Property Value
StaleWhileRevalidate
When true (default), an expired cache entry is returned immediately and refreshed in the background (stale-while-revalidate) — fast, but the caller may see one slightly stale value. When false, an expired entry is refreshed synchronously so the caller always gets a fresh value (subject to HttpTimeout), at the cost of blocking on the refresh.
public bool StaleWhileRevalidate { get; set; }