Skip to content

NetworkRestrictions

Namespace: PuppeteerSharp

public class NetworkRestrictions

Network restrictions that can be applied to a browser at runtime using RestrictNetworkAsync(NetworkRestrictions).

Inheritance: object

View source

public string[] Allowlist { get; set; }

A list of <a href=“https://urlpattern.spec.whatwg.org/"&gt;URLPattern&lt;/a> strings to allow. Mutually exclusive with BlockList. Passing an empty array or null means no restriction.

Value: string[]

View source

public string[] BlockList { get; set; }

A list of <a href=“https://urlpattern.spec.whatwg.org/"&gt;URLPattern&lt;/a> strings to block. Mutually exclusive with Allowlist. Passing an empty array or null means no restriction.

Value: string[]

View source

Made with love by Dario Kondratiuk