server {
    listen 80;
    listen [::]:80;
    server_name easy-bypass.local;

    root /usr/share/easy-bypass/web-ui;
    index index.html;

    location = /ui.conf {
        default_type text/plain;
        add_header Cache-Control "no-store";
        try_files /ui.conf =404;
    }

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

    location /api/v3/ {
        proxy_pass http://127.0.0.1:8080;
        proxy_http_version 1.1;
        proxy_set_header Host $host;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
        proxy_read_timeout 3600s;
    }

    location = /health/ready {
        proxy_pass http://127.0.0.1:8080;
    }

    location = /health/live {
        proxy_pass http://127.0.0.1:8080;
    }
}
