HTTP JavaScript directives
js_body_filter (http-js)
Selects a synchronous per-buffer response body filter.
Formal Syntax & Structure
nginx syntaxnginx
js_body_filter module.function [buffer_type=string | buffer];Parameters & Attributes
| Name | Type | Description |
|---|---|---|
| handler | module.function | Synchronous chunk filter, not whole-response transformation. |
| buffer_type | buffer_type=string | buffer | Default string; use buffer for binary content. If length changes, remove stale Content-Length in header filter. |
Working Example
Example Snippetnginx
js_body_filter app.upper;