Ditto 1.1.7
Public Member Functions | Public Attributes | List of all members
ditto::HttpListenConfig Class Reference

Part of the Listen config that relates to incoming HTTP connections. More...

#include <TransportConfig.hpp>

Public Member Functions

bool operator== (const HttpListenConfig &other) const
 
bool operator!= (const HttpListenConfig &other) const
 

Public Attributes

bool enabled = false
 
std::string interface_ip = "[::]"
 
uint16_t port = 8080
 
bool websocket_sync = false
 
std::string static_content_path
 
std::string tls_key_path
 
std::string tls_certificate_path
 

Detailed Description

Part of the Listen config that relates to incoming HTTP connections.

Member Data Documentation

◆ enabled

bool ditto::HttpListenConfig::enabled = false

Whether or not the HTTP listen connection should be enabled.

◆ interface_ip

std::string ditto::HttpListenConfig::interface_ip = "[::]"

The IP interface to bind to. [::] by default.

◆ port

uint16_t ditto::HttpListenConfig::port = 8080

Listening port. 80 by default.

◆ static_content_path

std::string ditto::HttpListenConfig::static_content_path

An absolute path to a directory of static HTTP content that should be served by this device.

By default this feature is disabled.

◆ tls_certificate_path

std::string ditto::HttpListenConfig::tls_certificate_path

An absolute path to the PEM-formatted certificate for HTTPS. Must be set together with tls_key_path.

If not set, the server runs as unencrypted HTTP.

◆ tls_key_path

std::string ditto::HttpListenConfig::tls_key_path

An absolute path to the PEM-formatted private key for HTTPS. Must be set together with tls_certificate_path.

If not set, the server runs as unencrypted HTTP.

◆ websocket_sync

bool ditto::HttpListenConfig::websocket_sync = false

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.