Class ServerOptions
Homeserver identity, public address and registration, configuration section Section.
Implements
Inherited Members
Namespace: Uniform.Matrix.Server.Configuration
Assembly: Uniform.Matrix.Server.dll
Syntax
public sealed record ServerOptions : IEquatable<ServerOptions>
Fields
| Edit this page View SourceSection
Configuration section name.
Declaration
public const string Section = "Server"
Field Value
| Type | Description |
|---|---|
| string |
Properties
| Edit this page View SourcePoliciesVersion
Version of TermsUrl and PrivacyPolicyUrl; change it when they change.
Declaration
public string PoliciesVersion { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
PrivacyPolicyUrl
Address of the privacy policy that new users accept when registering; none when unset.
Declaration
public string? PrivacyPolicyUrl { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
PublicBaseUrl
Public URL clients use, e.g. https://matrix.example.org, announced in /.well-known/matrix/client; none when unset.
Declaration
public string? PublicBaseUrl { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
Registration
Declaration
public RegistrationMode Registration { get; set; }
Property Value
| Type | Description |
|---|---|
| RegistrationMode |
RegistrationTokens
Comma-separated tokens that allow registering when Registration is Token.
Declaration
public string? RegistrationTokens { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
ServerName
Server name in user IDs and room aliases, e.g. example.org in @alice:example.org; changing it later orphans every account.
Declaration
public string ServerName { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
ServerNoticesLocalpart
Localpart of the account that sends server notices, created without a password when the first notice is sent.
Declaration
public string ServerNoticesLocalpart { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
TermsUrl
Address of the terms of service that new users accept when registering, e.g. https://example.org/terms.html; none when unset.
Declaration
public string? TermsUrl { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
TrustedProxies
Addresses of reverse proxies whose X-Forwarded-For and X-Forwarded-Proto headers are believed, separated by commas, e.g. 192.168.1.2; without them, the proxy's own address counts for rate limits and logs.
Declaration
public string? TrustedProxies { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
Methods
| Edit this page View SourceGetRegistrationTokens()
Return the registration tokens as a list.
Declaration
public IReadOnlyList<string> GetRegistrationTokens()
Returns
| Type | Description |
|---|---|
| IReadOnlyList<string> |
GetTrustedProxies()
Return TrustedProxies as addresses; throw FormatException for one that is not an IP address.
Declaration
public IReadOnlyList<IPAddress> GetTrustedProxies()
Returns
| Type | Description |
|---|---|
| IReadOnlyList<IPAddress> |