Class PublicAddresses
HTTP clients that reach addresses users give, such as push gateways and pages to preview, without letting users make the server reach machines inside its network.
Inherited Members
Namespace: Uniform.Matrix.Server.Http
Assembly: Uniform.Matrix.Server.dll
Syntax
public static class PublicAddresses
Methods
| Edit this page View SourceCreateHandler(Func<bool>, string)
Return a handler that connects only to public addresses unless allowPrivate says otherwise, checking the very addresses it connects to, so a host cannot resolve to a public address for the check and a private one for the request; redirects are checked the same way.
Declaration
public static SocketsHttpHandler CreateHandler(Func<bool> allowPrivate, string setting)
Parameters
| Type | Name | Description |
|---|---|---|
| Func<bool> | allowPrivate | Whether private addresses are allowed now, read on every connection so a setting applies at once. |
| string | setting | Name of the setting, for the error message. |
Returns
| Type | Description |
|---|---|
| SocketsHttpHandler |
IsPublic(IPAddress)
Return whether an address is public: not loopback, private, link-local, shared, unique-local or multicast.
Declaration
public static bool IsPublic(IPAddress address)
Parameters
| Type | Name | Description |
|---|---|---|
| IPAddress | address |
Returns
| Type | Description |
|---|---|
| bool |