Skip to main content

Configure servers for Tessera API

You can configure the servers for the Tessera API in the Tessera configuration file.

Specify the servers to be started as a list in serverConfigs.

Server configuration
"serverConfigs": [
<server settings>
]

Server addresses

The server configuration has two address entries:

  • serverAddress - Address of the server. This can be specified as an IP address or a DNS name.
  • bindingAddress - (optional) Endpoint to use for the binding. Specify to bind to an internal IP while advertising an external IP using serverAddress.

Each server is individually configured and can advertise over HTTP, HTTPS, or a Unix Socket.

You can also configure CORS for the ThirdParty server type.

HTTP server configuration

{
"app": "<app type>",
"serverAddress": "http://[host]:[port]/[path]",
"communicationType": "REST"
}

HTTPS server configuration

{
"app": "<app type>",
"serverAddress": "https://[host]:[port]/[path]",
"communicationType" : "REST",
"sslConfig": {
<SSL settings>
}
}

Unix socket server configuration

{
"app": "<app type>",
"serverAddress": "unix://[path]",
"communicationType": "REST"
}

Configure CORS

The ThirdParty server type supports configuring CORS to control access to resources.

ThirdParty CORS configuration
{
"app": "ThirdParty",
"serverAddress": "http://localhost:9081",
"communicationType": "REST",
"cors": {
"allowedMethods": ["GET", "POST", "PUT", "DELETE", "OPTIONS", "HEAD"],
"allowedOrigins": ["http://localhost:63342"],
"allowedHeaders": ["content-type"],
"allowCredentials": true
}
}