What specifically are you concerned about? An HTTP connection to NGINX is just a TCP connection anybody can open, a database connection to postgres is the same. Both applications need to be extremely careful with those connections to protect against attacks, but database security is already a huge priority, so they both have invested heavily in that.
One concern I can think of is NGINX might have better DoS protection. What else do you have in mind?