Docs: Fix links and formatting in user guide. (#13661)

Co-authored-by: marcel2012 <13705842+marcel2012@users.noreply.github.com>
This commit is contained in:
k8s-infra-cherrypick-robot 2025-07-23 01:42:27 -07:00 committed by GitHub
parent 89194f7fcb
commit 59e70c4abc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 18 additions and 17 deletions

View File

@ -1,4 +1,4 @@
# Basic usage - host based routing
# Basic usage - host based routing
ingress-nginx can be used for many use cases, inside various cloud providers and supports a lot of configurations. In this section you can find a common usage scenario where a single load balancer powered by ingress-nginx will route traffic to 2 different HTTP backend services based on the host name.

View File

@ -446,15 +446,15 @@ kind: Ingress
metadata:
annotations:
nginx.ingress.kubernetes.io/server-snippet: |
set $agentflag 0;
set $agentflag 0;
if ($http_user_agent ~* "(Mobile)" ){
set $agentflag 1;
}
if ($http_user_agent ~* "(Mobile)" ){
set $agentflag 1;
}
if ( $agentflag = 1 ) {
return 301 https://m.example.com;
}
if ( $agentflag = 1 ) {
return 301 https://m.example.com;
}
```
!!! attention
@ -530,7 +530,7 @@ Additionally it is possible to set:
```yaml
nginx.ingress.kubernetes.io/auth-url: http://foo.com/external-auth
nginx.ingress.kubernetes.io/auth-snippet: |
proxy_set_header Foo-Header 42;
proxy_set_header Foo-Header 42;
```
> Note: `nginx.ingress.kubernetes.io/auth-snippet` is an optional annotation. However, it may only be used in conjunction with `nginx.ingress.kubernetes.io/auth-url` and will be ignored if `nginx.ingress.kubernetes.io/auth-url` is not set
@ -879,8 +879,8 @@ nginx.ingress.kubernetes.io/modsecurity-transaction-id: "$request_id"
You can also add your own set of modsecurity rules via a snippet:
```yaml
nginx.ingress.kubernetes.io/modsecurity-snippet: |
SecRuleEngine On
SecDebugLog /tmp/modsec_debug.log
SecRuleEngine On
SecDebugLog /tmp/modsec_debug.log
```
Note: If you use both `enable-owasp-core-rules` and `modsecurity-snippet` annotations together, only the
@ -891,13 +891,13 @@ statement:
nginx 0.24.1 and below
```yaml
nginx.ingress.kubernetes.io/modsecurity-snippet: |
Include /etc/nginx/owasp-modsecurity-crs/nginx-modsecurity.conf
Include /etc/nginx/modsecurity/modsecurity.conf
Include /etc/nginx/owasp-modsecurity-crs/nginx-modsecurity.conf
Include /etc/nginx/modsecurity/modsecurity.conf
```
nginx 0.25.0 and above
```yaml
nginx.ingress.kubernetes.io/modsecurity-snippet: |
Include /etc/nginx/owasp-modsecurity-crs/nginx-modsecurity.conf
Include /etc/nginx/owasp-modsecurity-crs/nginx-modsecurity.conf
```
### Backend Protocol

View File

@ -73,7 +73,7 @@ The following table shows a configuration option's name, type, and the default v
| [enable-multi-accept](#enable-multi-accept) | bool | "true" | |
| [max-worker-connections](#max-worker-connections) | int | 16384 | |
| [max-worker-open-files](#max-worker-open-files) | int | 0 | |
| [map-hash-bucket-size](#max-hash-bucket-size) | int | 64 | |
| [map-hash-bucket-size](#map-hash-bucket-size) | int | 64 | |
| [nginx-status-ipv4-whitelist](#nginx-status-ipv4-whitelist) | []string | "127.0.0.1" | |
| [nginx-status-ipv6-whitelist](#nginx-status-ipv6-whitelist) | []string | "::1" | |
| [proxy-real-ip-cidr](#proxy-real-ip-cidr) | []string | "0.0.0.0/0" | |
@ -1039,10 +1039,11 @@ Specifies the port to use when uploading traces. _**default:**_ 4317
Specifies the service name to use for any traces created. _**default:**_ nginx
## opentelemetry-trust-incoming-span: "true"
## opentelemetry-trust-incoming-span
Enables or disables using spans from incoming requests as parent for created ones. _**default:**_ true
## otel-sampler-parent-based
## otel-sampler-parent-based
Uses sampler implementation which by default will take a sample if parent Activity is sampled. _**default:**_ false