pub type EJDB_HTTP = _EJDB_HTTP;Expand description
@brief EJDB HTTP/Websocket Server options.
Aliased Type§
struct EJDB_HTTP {
pub enabled: bool,
pub port: i32,
pub bind: *const i8,
pub access_token: *const i8,
pub access_token_len: u64,
pub blocking: bool,
pub read_anon: bool,
pub max_body_size: u64,
pub cors: bool,
pub ssl_private_key: *const i8,
pub ssl_certs: *const i8,
}Fields§
§enabled: bool< If HTTP/Websocket endpoint enabled. Default: false
port: i32< Listen port number, required
bind: *const i8< Listen IP/host. Default: localhost
access_token: *const i8< Server access token passed in X-Access-Token header. Default: zero
access_token_len: u64< Length of access token string. Default: zero
blocking: bool< Block ejdb_open() thread until http service finished.
Otherwise HTTP server will be started in background.
read_anon: bool< Allow anonymous read-only database access
max_body_size: u64< Maximum WS/HTTP API body size. Default: 64Mb, Min: 512K
cors: bool< Allow CORS
ssl_private_key: *const i8< Path to TLS 1.2 private key PEM
ssl_certs: *const i8< Path to TLS 1.2 certificates