Message "28000: no pg_hba.conf entry for host \"xx.xxx.xxx.xxxx\", user \"User", database \"databasename\", SSL off"
Add sslmode=Require; and Trust Server Certificate=true; in your connection string.It will work for sure.
Heroku Postgres requires client connections are made with SSL. Configure your application to require SSL on database connections and this error will go away.
host all all 0.0.0.0/0 trust
or host all all 192.168.0.0/24 trust
of course, you also need
listen_address = '*'