server {
    listen 80;
    server_name hyapp-platform.global-interaction.com _;

    root /usr/share/nginx/html;
    index index.html;

    location = /__frontend_healthz {
        access_log off;
        add_header Content-Type text/plain;
        return 200 "ok\n";
    }

    location /api/ {
        proxy_http_version 1.1;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_pass http://127.0.0.1:13100/api/;
    }

    location = /healthz {
        proxy_pass http://127.0.0.1:13100/healthz;
    }

    location = /readyz {
        proxy_pass http://127.0.0.1:13100/readyz;
    }

    location / {
        try_files $uri $uri/ /index.html;
    }
}
