Skip to main content

Definition

Assembly: CloudNimble.BlazorEssentials.Server.dll Namespace: CloudNimble.BlazorEssentials.Server.Middleware Inheritance: System.Object

Syntax

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 context
  • Cross-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 object

Syntax

Methods

Equals Inherited Virtual

Inherited from object

Syntax

Parameters

Returns

Type: bool

Equals Inherited

Inherited from object

Syntax

Parameters

Returns

Type: bool

GetHashCode Inherited Virtual

Inherited from object

Syntax

Returns

Type: int

GetType Inherited

Inherited from object

Syntax

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 object

Syntax

Returns

Type: object

ReferenceEquals Inherited

Inherited from object

Syntax

Parameters

Returns

Type: bool

ToString Inherited Virtual

Inherited from object

Syntax

Returns

Type: string?