Definition
Assembly: CloudNimble.BlazorEssentials.Server.dll Namespace: CloudNimble.BlazorEssentials.Server.Middleware Inheritance: System.ObjectSyntax
Summary
Middleware that adds Cross-Origin Isolation headers (COOP and COEP) to responses. These headers are required for features like SharedArrayBuffer and high-resolution timers, which are needed by WASM libraries like TursoDb that use OPFS (Origin Private File System).Remarks
<strong>Warning:</strong> Enabling cross-origin isolation may break third-party scripts, iframes, and CDN resources that are not configured to work in an isolated context. Test thoroughly before enabling in production. Headers added:Cross-Origin-Opener-Policy: same-origin- Isolates the browsing contextCross-Origin-Embedder-Policy: require-corp- Requires all resources to explicitly grant permission
Examples
Constructors
.ctor
Initializes a new instance of the CrossOriginIsolationMiddleware class.Syntax
Parameters
.ctor Inherited
Inherited from
objectSyntax
Methods
Equals Inherited Virtual
Inherited from
objectSyntax
Parameters
Returns
Type:bool
Equals Inherited
Inherited from
objectSyntax
Parameters
Returns
Type:bool
GetHashCode Inherited Virtual
Inherited from
objectSyntax
Returns
Type:int
GetType Inherited
Inherited from
objectSyntax
Returns
Type:System.Type
InvokeAsync
Invokes the middleware to add cross-origin isolation headers.Syntax
Parameters
Returns
Type:System.Threading.Tasks.Task
A task representing the asynchronous operation.
MemberwiseClone Inherited
Inherited from
objectSyntax
Returns
Type:object
ReferenceEquals Inherited
Inherited from
objectSyntax
Parameters
Returns
Type:bool
ToString Inherited Virtual
Inherited from
objectSyntax
Returns
Type:string?