apiVersion: v1 kind: ConfigMap metadata: name: nginx labels: app: k8s-io data: # Adding new entries here will make them appear as files in the deployment. # Please update kubernetes/k8s.io/apps/k8s-io/README.md when you update this file nginx.conf: | worker_processes 5; events { } http { # Disable to show the nginx version server_tokens off; # This is the main site. server { server_name k8s.io; listen 80 default_server; location = /_healthz { add_header Content-Type text/plain; return 200 'ok'; } location ~ ^/(?[^/]*)(?/.*)?$ { # $https is set to 'on' when connecting to nginx via HTTPS directly. set $https_status $https; if ($http_x_forwarded_proto = 'https') { set $https_status 'on'; } # Upgrade HTTP to HTTPS. if ($https_status != 'on') { return 301 https://$host$request_uri; } if ($arg_go-get = "1") { # This is a go-get operation. return 200 '