You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: examples/customization/README.md
+3Lines changed: 3 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -31,6 +31,9 @@ The table below summarizes some of the options. More options (extensions) are av
31
31
| N/A |`real-ip-header`| Sets the value of the [real_ip_header](http://nginx.org/en/docs/http/ngx_http_realip_module.html#real_ip_header) directive. |`X-Real-IP`|
32
32
| N/A |`real-ip-recursive`| Enables or disables the [real_ip_recursive](http://nginx.org/en/docs/http/ngx_http_realip_module.html#real_ip_recursive) directive. |`False`|
33
33
|`nginx.org/server-tokens`|`server-tokens`| Enables or disables the [server_tokens](http://nginx.org/en/docs/http/ngx_http_core_module.html#server_tokens) directive. Additionally, with the NGINX Plus controller, you can specify a custom string value. The empty string value disables the emission of the “Server” field. |`True`|
34
+
| N/A |`http-snippets`| Sets a custom snippet in http context. | N/A |
35
+
|`nginx.org/location-snippets`|`location-snippets`| Sets a custom snippet in location context. | N/A |
36
+
|`nginx.org/server-snippets`|`server-snippets`| Sets a custom snippet in server context. | N/A |
Copy file name to clipboardExpand all lines: examples/customization/nginx-config.yaml
+12Lines changed: 12 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -32,3 +32,15 @@ data:
32
32
real-ip-header: "proxy_protocol"# default is X-Real-IP. Sets the value of the real_ip_header directive. http://nginx.org/en/docs/http/ngx_http_realip_module.html#real_ip_header
33
33
real-ip-recursive: "True"# default is "False". Enables or disables the real_ip_recursive directive. See http://nginx.org/en/docs/http/ngx_http_realip_module.html#real_ip_recursive
34
34
server-tokens: "False"# default is "True". Enables or disables the server_tokens directive. See http://nginx.org/en/docs/http/ngx_http_core_module.html#server_tokens
35
+
http-snippets: | # Pipe is used for multiple line snippets. Make sure the snippet is not a default value, in order to avoid duplication.
36
+
map $uri $new_uri {
37
+
/old.html /index.html;
38
+
}
39
+
server-snippets: | # No default. Pipe is used for multiple line snippets. Make sure the snippet is not a default value, in order to avoid duplication.
40
+
# Old website redirect
41
+
if ($new_uri) {
42
+
rewrite ^ $new_uri permanent;
43
+
}
44
+
location-snippets: | # No default. Pipe is used for multiple line snippets. Make sure the snippet is not a default value, in order to avoid duplication.
0 commit comments