summaryrefslogtreecommitdiff
path: root/pod/nginx/ngx_http_addition_module.pod
blob: 674ee3a3a95c69665a0dd93ae3d361a318308c6d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
=encoding utf-8

=head1 NAME

ngx_http_addition_module - Module ngx_http_addition_module




=head1



The C<ngx_http_addition_module> module is a filter
that adds text before and after a response.
This module is not built by default, it should be enabled with the
C<--with-http_addition_module>
configuration parameter.




=head1 Example Configuration




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






=head1 Directives

=head2 add_before_body


B<syntax:> add_before_body I<I<C<uri>>>



B<context:> I<http>


B<context:> I<server>


B<context:> I<location>





Adds the text returned as a result of processing a given subrequest
before the response body.
An empty string (C<"">) as a parameter cancels addition
inherited from the previous configuration level.







=head2 add_after_body


B<syntax:> add_after_body I<I<C<uri>>>



B<context:> I<http>


B<context:> I<server>


B<context:> I<location>





Adds the text returned as a result of processing a given subrequest
after the response body.
An empty string (C<"">) as a parameter cancels addition
inherited from the previous configuration level.







=head2 addition_types


B<syntax:> addition_types I<I<C<mime-type>> ...>


B<default:> I<textE<sol>html>


B<context:> I<http>


B<context:> I<server>


B<context:> I<location>



This directive appeared in version 0.7.9.





Allows adding text in responses with the specified MIME types,
in addition to “C<textE<sol>html>”.
The special value “C<*>” matches any MIME type (0.8.29).