Skip to content

Instantly share code, notes, and snippets.

@alicek106
Created April 6, 2019 13:33
Show Gist options
  • Save alicek106/b958deb1937f51babf482a346d66511a to your computer and use it in GitHub Desktop.
Save alicek106/b958deb1937f51babf482a346d66511a to your computer and use it in GitHub Desktop.
kind: Ingress
metadata:
annotations:
nginx.ingress.kubernetes.io/server-snippet: |
set $flag 0;
if ($http_user_agent ~* "(Mobile)" ){
set $flag = 1;
}
if ( $flag = 1 ){
return 301 http://google.com;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment