Skip to main content

UWS HTTP

UWS is enabled throughout all endpoints by setting the httpServer type to uws.

Important:

UWS does not work on alpine images and returns C++ error traces on failure. If you run into a bug please try it out with the default http server to see if it can be reproduced on both types.

To enable SSL on uws, all you need to do is pass in the location to a key and cert.

You can either do this using an explicit path:

key: /location/to/ssl/key.pem

or relative to the config file (less likely on a production install):

key: file(relative/to/config/ssl/key.pem)

How to configure:

httpServer:
type: uws
options:
# url path for http health-checks, GET requests to this path will return 200 if deepstream is alive
healthCheckPath: /health-check
# -- CORS --
# if disabled, only requests with an 'Origin' header matching one specified under 'origins'
# below will be permitted and the 'Access-Control-Allow-Credentials' response header will be
# enabled
allowAllOrigins: true
# a list of allowed origins
origins:
- 'https://example.com'
# maximum allowed size of a POST request body, in bytes, defaults to 1 MB
maxMessageSize: 1048576
# Maximum length of allowed backpressure per socket when publishing or sending messages.
# Slow receivers with too high backpressure will be skipped until they catch up or timeout. Defaults to 1024 * 1024.
maxBackpressure: 1024*1024
# Headers to copy over from websocket
headers:
- user-agent
# Options required to create an ssl app
ssl:
key: file(ssl/key.pem)
cert: file(ssl/cert.pem)
## dhParams: ...
## passphrase: ...