HTTP addition directives

add_before_body (http-addition)

Adds a fixed internal response before the main response body.

Formal Syntax & Structure

nginx syntaxnginx
add_before_body uri;

Parameters & Attributes

NameTypeDescription
uriinternal URI | empty quoted stringFetch a fragment through a subrequest and insert before the response body. Empty string cancels inherited insertion.

Working Example

Example Snippetnginx
add_before_body /_banner;
Nginx Reference