ngx_http_addition_module

ngx_http_addition_module 모듈은 응답 전/후 텍스트를 추가하는 필터입니다. 이 모듈은 기본으로 구축되지 않으므로, –with-http_addition_module 구성 매개변수로 활성화해야 합니다.

예제 구성

location / {
    add_before_body /before_action;
    add_after_body  /after_action;
}

Directives

Syntax:  add_before_body uri;
Default: —
Context: http, server, location

응답 본문 앞에 특정 하위 요청을 처리한 결과로 반환된 텍스트를 추가합니다. 빈 문자열(“”)을 매개변수로 사용하면 이전 구성 수준에서 상속된 추가 부분이 상쇄됩니다.

Syntax:  addition_types mime-type ...;
Default: addition_types text/html;
Context: http, server, location
This directive appeared in version 0.7.9.

“text/html” 외에 지정된 MIME 유형을 포함한 응답에서 텍스트를 추가합니다. 특수 값 “*”은 모든 MIME 유형과 일치합니다(0.8.29).