Skip to content

Permissions‐Policy Header

Marthijn van den Heuvel edited this page Apr 18, 2025 · 2 revisions

The Permissions-Policy header provides mechanisms to explicitly declare which features and APIs can be used in the browser.

Usage

app.UsePermissionPolicy(
    p =>
    {
        // configure the various features
        p
            .AddAccelerometer(x => x.Disallow())
            .AddPayment(x => x.AddOrigin("example.com"))
            .AddBluetooth(x => x.AllowAll())
            .AddAutoplay(x => x.AddSelf());
    });

References

Clone this wiki locally