github.com/abayer/test-infra@v0.0.5/mungegithub/submit-queue/nginx-redirect/nginx.conf (about)

     1  events {
     2    worker_connections  1024;
     3  }
     4  
     5  http {
     6    proxy_set_header Host $host;
     7    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
     8    proxy_set_header X-Forwarded-Proto $scheme;
     9    proxy_set_header X-Real-IP $remote_addr;
    10  
    11    server {
    12      listen 80;
    13      server_name community.submit-queue.k8s.io;
    14      location / {
    15          if ($http_user_agent ~ (GoogleHC) ) {
    16            return 200;
    17          }
    18          if ($http_x_forwarded_proto != 'https') {
    19            return 301 https://$host$request_uri;
    20          }
    21          proxy_pass http://community-sq-status;
    22      }
    23    }
    24    server {
    25      listen 80;
    26      server_name contrib.submit-queue.k8s.io;
    27      location / {
    28          if ($http_user_agent ~ (GoogleHC) ) {
    29            return 200;
    30          }
    31          if ($http_x_forwarded_proto != 'https') {
    32            return 301 https://$host$request_uri;
    33          }
    34          proxy_pass http://contrib-sq-status;
    35      }
    36    }
    37    server {
    38      listen 80;
    39      server_name kops.submit-queue.k8s.io;
    40      location / {
    41          if ($http_user_agent ~ (GoogleHC) ) {
    42            return 200;
    43          }
    44          if ($http_x_forwarded_proto != 'https') {
    45            return 301 https://$host$request_uri;
    46          }
    47          proxy_pass http://kops-sq-status;
    48      }
    49    }
    50    server {
    51      listen 80;
    52      server_name submit-queue.k8s.io kubernetes.submit-queue.k8s.io;
    53      location / {
    54          if ($http_user_agent ~ (GoogleHC) ) {
    55            return 200;
    56          }
    57          if ($http_x_forwarded_proto != 'https') {
    58            return 301 https://$host$request_uri;
    59          }
    60          proxy_pass http://kubernetes-sq-status;
    61      }
    62    }
    63  }