Skip to content

Commit

Permalink
Merge pull request #3175 from yanc0/fix-server-snippet-annotation-doc
Browse files Browse the repository at this point in the history
Fix yaml indentation in annotations server-snippet doc
  • Loading branch information
k8s-ci-robot authored Oct 3, 2018
2 parents d9f5814 + 6d9977b commit 43b4730
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions docs/user-guide/nginx-configuration/annotations.md
Original file line number Diff line number Diff line change
Expand Up @@ -295,15 +295,15 @@ kind: Ingress
metadata:
annotations:
nginx.ingress.kubernetes.io/server-snippet: |
set $agentflag 0;
if ($http_user_agent ~* "(Mobile)" ){
set $agentflag 1;
}
if ( $agentflag = 1 ) {
return 301 https://m.example.com;
}
set $agentflag 0;
if ($http_user_agent ~* "(Mobile)" ){
set $agentflag 1;
}
if ( $agentflag = 1 ) {
return 301 https://m.example.com;
}
```

!!! attention
Expand Down

0 comments on commit 43b4730

Please sign in to comment.