Xentara v2.1
User Manual
JSON Format for the HTTP Server Configuration
See also
xentara_websocket_interface

The JSON object describing the configuration of the built-in Xentara HTTP server has the following syntax:

"httpServer": {
"services": [ "WebSocket" ],
"port": 19670,
"authentication": {
"..."
},
"CORS": {
"..."
}
}

Object Members
services

A JSON array specifying the services the HTTP server should provide. The only supported service is "WebSocket". If you specify an empty array, the HTTP server will be disabled.

You can specify an empty array to temporarily disable the HTTP server without removing the "httpServer" object altogether.

portNumber

An optional numeric value specifying the port number the HTTP server should listen on. The port number must be between 1 and 65535. If you do not specify this member, then the default port number of 19670 will be used.

Please note that under Linux, the port numbers 1 to 1024 normally require root privileges to use. Using these ports is therefore not recommended. If you do need to use a port number below 1025, you must give Xentara the necessary privileges using setcap(8).

authentication

An optional object containg the authentication options for the HTTP server. The format of the object is described in JSON Format for HTTP Authentication Settings.

If you do not specify this member, then the default options described in JSON Format for HTTP Authentication Settings will be used.

CORS

An optional object containg the CORS (Cross-Origin Resource Sharing) options for the HTTP server. The format of the object is described in JSON Format for CORS (Cross-Origin Resource Sharing) Settings.

If you do not specify this member, then the default options described in JSON Format for CORS (Cross-Origin Resource Sharing) Settings will be used.

If you do not specify an "httpServer" object at all, then the HTTP server will be disabled.