apiVersion: v1
kind: ConfigMap
metadata:
  name: nginx-config
data:
  default.conf: |
    server {
        # listen on port 80 (http)
        listen 80;
        listen [::]:80;
        server_name _;
        location / {
            # forward application requests to the gunicorn server
            proxy_pass http://server:80;
            proxy_redirect off;
            proxy_set_header Host $host;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        }
    }