server {
    listen 80;
    listen 443 ssl http2;

    server_name 127.0.0.1;

    proxy_set_header X-Real-IP  $remote_addr; # pass on real client IP

    location / {
        proxy_pass http://localhost:8080;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header Host $http_host;
        proxy_set_header X-NginX-Proxy true;
    }

    location /heartbeat {
        default_type text/plain;
        return 200 "Heartbeat";
    }
}
