I am trying to run a website sent to me but after doing so this error appeared
connect to PostgreSQL server: FATAL: no pg_hba.conf entry for host "4X.XXX.XX.XXX", user "userXXX", database "dbXXX", SSL off in C:\xampp\htdocs\xmastool\index.php on line 37
I found this answer that says that I just need to add an entry in the pg_hba.conf file for that particular user.
This is my pg_hba.conf file.
# TYPE DATABASE USER ADDRESS METHOD
# IPv4 local connections:
local dbXXX userXXX md5
host dbXXX userXXX XX.XXX.XXX.XXX md5
host all all 127.0.0.1/32 md5
# IPv6 local connections:
host all all ::1/128 md5
# Allow replication connections from localhost, by a user with the
# replication privilege.
#host replication postgres 127.0.0.1/32 md5
#host replication postgres ::1/128 md5
but after doing so, the error still persists. I restarted my XAMPP server several times but nothing changes.
What do I need to change in pg_hba.conf?

sudo -u <username> psql postgres, then\passwordat the resultant sql prompt will prompt for setting one. – ijoseph May 30 '18 at 21:54::0/0, otherwise connections from IPv6 addresses will still be rejected. – Herohtar Oct 18 '19 at 21:31SELECT pg_reload_conf()– Rafael Membrives Nov 23 '22 at 09:31TypeOrmModule.forRoot({ ssl: { rejectUnauthorized: false, }, }),– Mahmoud Zalt Mar 25 '24 at 22:14