apiVersion: v1
kind: ConfigMap
metadata:
  name: vivo-nginx-configmap
  namespace: vivo
  labels:
    app: vivo
    environment: dev
    tier: backend
    owner: szd2013
data:
  nginx.conf: |-
    server {
        listen 80 default_server;
        listen [::]:80 default_server;

        location / {
            if ($http_user_agent ~ (11A465|Ahrefs|ArchiveBot|AspiegelBot|Baiduspider|bingbot|BLEXBot|Bytespider|CCBot|Curebot|Daum|Detectify|DotBot|Grapeshot|heritrix|Kinza|LieBaoFast|Linguee|LMY47V|MauiBot|Mb2345Browser|MegaIndex|MicroMessenger|MJ12bot|MQQBrowser|PageFreezer|PiplBot|Riddler|Screaming.Frog|Search365bot|SearchBlox|Seekport|SemanticScholarBot|SemrushBot|SEOkicks|serpstatbot|Siteimprove.com|Sogou.web.spider|trendictionbot|TurnitinBot|UCBrowser|weborama-fetcher|Vagabondo|VelenPublicWebCrawler|YandexBot|YisouSpider) ) {
              return 403;
            }
            client_max_body_size 0;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            proxy_set_header X-Forwarded-Proto $scheme;
            proxy_set_header X-Forwarded-Port $server_port;
            proxy_set_header Host $host;
            keepalive_timeout 300;
            send_timeout 300;
            fastcgi_send_timeout 300; 
            fastcgi_read_timeout 300;
            proxy_read_timeout 300;
            proxy_send_timeout 300;
            proxy_connect_timeout 300;
            proxy_pass http://localhost:8080/;
        }
        location /nginx-health {
            access_log off;
            return 200;
        }
    }