server {
    server_name login.mydomain.com;

    ...

    client_max_body_size 512K;

    location / {
        proxy_pass http://127.0.0.1:5005;
    }
}
