server {
  listen 80 default_server;
  listen [::]:80 default_server;

  server_name _;
  server_tokens off;

  location / {
    root /usr/share/nginx/html;
    index index.html index.htm;

    try_files $uri $uri/ =404;
  }

  location /subscribe {
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header X-Forwarded-Proto $scheme;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header Host $http_host;

    proxy_pass http://daarke:5000;
    proxy_redirect off;
  }

  location /stats {
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header X-Forwarded-Proto $scheme;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header Host $http_host;

    proxy_pass http://daarke:5000;
    proxy_redirect off;
  }


  location /health {
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header X-Forwarded-Proto $scheme;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header Host $http_host;

    proxy_pass http://daarke:5000;
    proxy_redirect off;
  }
}