If you want to use these modules, you must specify the relevant compilation parameters at compile time.
This module can add other location before or after the current location. It executes as an output filter, and the primary and child requests contained in other location are not fully buffered and are still passed to the client as a stream, because the length of the final answer body is unknown at the time the HTTP header is passed, and the HTTP chunked encoding is always used here.
Installation
This module is not compiled by default, and if you want to use it, you need to specify the following parameters at compile time:
In version 0.8.17 If the current location requests a child request of its own, the included location will not be added. such as the following configuration:
The request to connect to/foo does not add the/baz corresponding location to the field. Also note that you can only use strings when defining the location you want to include, but you cannot use variables, so the following configuration:
does not work (although it can be passed when the test configuration file is correct)
Instructions
Add_before_body
Syntax: Add_before_body URI Default value: No Working with fields: HTTP, server, location Adds a URI to the front of the answer body, sending a child request for one of the processing results.
Add_after_body
Syntax: Add_after_body URI Default value: No Working with fields: HTTP, server, location Adds a URI to the back of the answer body, sending a child request for one of the processing results.
Addition_types
Syntax: Addition_types mime-type [Mime-type ...] Default value: HTML Working with fields: HTTP, server, location Directive (0.7.9) allows additional MIME types (default "HTML") to be processed by the location. (This instruction was spelled "Addtion_types" in the source code before 0.8.17, but was fixed after version 0.8.17). )
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.