upstream kartsell_backend {
    server 127.0.0.1:5002;
    keepalive 32;
}

server {
    listen 443 ssl http2;
    server_name kartsell.taxbaik.com;

    ssl_certificate /etc/letsencrypt/live/kartsell.taxbaik.com/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/kartsell.taxbaik.com/privkey.pem;
    ssl_protocols TLSv1.2 TLSv1.3;

    location / {
        proxy_pass http://kartsell_backend;
        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_set_header X-KArtSell-User "nginx-proxy";
        proxy_set_header X-KArtSell-Role "Admin";
    }
}
