Return#

Allows sending a specified value to the client and then closing the connection.

When building from the source code, the module is built by default together with the Stream module (enabled with --with-stream); it can be disabled with the build option --without-stream_return_module.

In packages and images from our repositories, the module is included in the build.

Configuration Example#

server {
    listen 12345;
    return $time_iso8601;
}

Directives#

return#

Syntax

return value;

Default

Context

server

Specifies a value to send to the client. The value can contain variables.