This is not going to be easy to debug, it may be related to the NGINX configuration in production, maybe this is in Rails I am not sure.
I would try to first make the request direct to the Rails process and not to the express proxy, if that works then I would next debug a production docker setup on local.