DittoHTTPListenConfig
public struct DittoHTTPListenConfig : Equatable
extension DittoHTTPListenConfig: Codable
HTTP & WebSocket listening configuration.
-
Indicates whether HTTP listening is enabled.
Declaration
Swift
public var isEnabled: Bool
-
IP interface to bind to,
[::]
by default.Declaration
Swift
public var interfaceIP: String
-
Listening port.
80
by default.Declaration
Swift
public var port: UInt16
-
An absolute path to a directory of static HTTP content that should be served by this device.
If
nil
(default), this feature is disabled.Declaration
Swift
public var staticContentPath: String?
-
If
true
(default), peers can connect over webSocket to sync with this peer.This feature has security implications and should only be used together with documentation on Ditto’s website.
Declaration
Swift
public var webSocketSync: Bool
-
An absolute path to the PEM-formatted private key for HTTPS. Must be set together with tlsCertificatePath.
If
nil
, the server runs as unencrypted HTTP.Declaration
Swift
public var tlsKeyPath: String?
-
An absolute path to the PEM-formatted certificate for HTTPS. Must be set together with tlsKeyPath. If
nil
, the server runs as unencrypted HTTP.Declaration
Swift
public var tlsCertificatePath: String?
-
Enable acting as a provider of Ditto identities.
Declaration
Swift
public var isIdentityProvider: Bool
-
PEM-encoded private key for signing tokens and certificates when acting as an identity provider.
Declaration
Swift
public var identityProviderSigningKey: String?
-
PEM-encoded public keys for verifying tokens and certificates when acting as an identity provider.
Declaration
Swift
public var identityProviderVerifyingKeys: Array<String>?
-
PEM-encoded private key that should be used to issue certificates for clients in peer-to-peer mode.
Declaration
Swift
public var caKey: String?
-
IP interface to bind to,
[::]
by default.Declaration
Swift
@available(*, deprecated, message: "Please use `interfaceIP` instead.") public var interfaceIp: String { get set }
-
If
true
(default), peers can connect over webSocket to sync with this peer.This feature has security implications and should only be used together with documentation on Ditto’s website.
Declaration
Swift
@available(*, deprecated, message: "Please use `webSocketSync` instead.") public var websocketSync: Bool { get set }
-
Declaration
Swift
public init(from decoder: Decoder) throws