Couper Documentation

edge

WebSockets

The websockets block activates support for WebSocket connections in Couper.

Block nameContextLabel
websocketsproxyno label

Attributes

NameTypeDefaultDescription
add_request_headers
object
-

Key/value pairs to add as request headers in the upstream request.

add_response_headers
object
-

Key/value pairs to add as response headers in the client response.

remove_request_headers
tuple (string)
[]

List of names to remove headers from the upstream request.

remove_response_headers
tuple (string)
[]

List of names to remove headers from the client response.

set_request_headers
object
-

Key/value pairs to set as request headers in the upstream request.

set_response_headers
object
-

Key/value pairs to set as response headers in the client response.

timeout
string
-

The total deadline duration a WebSocket connection has to exist.

Duration

Values of type duration are provided as number string followed by a unit listed below.

Example: timeout = "300s"

Duration unitsDescription
nsnanoseconds
us (or ยตs)microseconds
msmilliseconds
sseconds
mminutes
hhours