Class RestDataSourceOptions
- Namespace
- ReportWright.Data.Json
- Assembly
- ReportWright.Data.Json.dll
What the host allows a REST data source to do. The allowlist is the SSRF defence: a request to a host not listed fails closed before any connection is made, redirects are never followed, and a response larger than the cap is refused rather than read.
public sealed class RestDataSourceOptions
- Inheritance
-
RestDataSourceOptions
- Inherited Members
Constructors
- RestDataSourceOptions()
Initializes the options with the defaults: no host allowed, HTTPS only, 10 MB responses.
Properties
- AllowInsecureHttp
Gets or sets a value indicating whether plain
httpis allowed; HTTPS only by default.
- AllowedHosts
Gets the hosts a request may reach: an exact host name, or
*.example.comfor the subdomains of a domain (not the domain itself). Empty means no host at all.
- ConfigureRequest
Gets or sets a step the host runs on every request before it is sent — to add the headers and authorization the RDL must never hold. When unset, a string Credential is sent as a bearer token.
- MaxResponseBytes
Gets or sets the most bytes a response may carry. A larger body is refused, not truncated.
- MessageHandler
Gets or sets the handler the provider's client uses, for tests; null for the default, which never follows redirects.
Methods
- Refuses(Uri)
Decides whether a URL may be requested.