Merge pull request #3175 from yanc0/fix-server-snippet-annotation-doc
Fix yaml indentation in annotations server-snippet doc
This commit is contained in:
commit
43b47304e3
1 changed files with 9 additions and 9 deletions
|
@ -295,15 +295,15 @@ kind: Ingress
|
||||||
metadata:
|
metadata:
|
||||||
annotations:
|
annotations:
|
||||||
nginx.ingress.kubernetes.io/server-snippet: |
|
nginx.ingress.kubernetes.io/server-snippet: |
|
||||||
set $agentflag 0;
|
set $agentflag 0;
|
||||||
|
|
||||||
if ($http_user_agent ~* "(Mobile)" ){
|
if ($http_user_agent ~* "(Mobile)" ){
|
||||||
set $agentflag 1;
|
set $agentflag 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( $agentflag = 1 ) {
|
if ( $agentflag = 1 ) {
|
||||||
return 301 https://m.example.com;
|
return 301 https://m.example.com;
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
!!! attention
|
!!! attention
|
||||||
|
|
Loading…
Reference in a new issue