February 2018
Beginner to intermediate
348 pages
9h 40m
English
The Addition module allows you to (through simple directives) add content before or after the body of the HTTP response.
The two main directives are:
add_before_body file_uri; add_after_body file_uri;
As stated previously, Nginx triggers a sub-request for fetching the specified URI. Additionally, you can define the types of files to which the content is appended in case your location block pattern is not specific enough (default: text/html):
addition_types mime_type1 [mime_type2...]; addition_types *;