Xojo Web App Postgres Database Connection Question

Hello everyone!

I’m working on my first Xojo web application project and I’ve been having an issue where my application connects to my local Postgres database (on MacOS) seemingly automatically, regardless of whether or not any of the Host/Port/Database/UserName/Password information is correct or even provided at all. The PostgresSQLDatabase class connect method returns a true boolean value and when I fetch a rowset, it returns all records correctly.

I’ve tried resetting the computer and Postgres server, as well as clearing the browser cache, all to no avail. Is there something I may need to alter in my Postgres hba.config file or is Xojo somehow caching my connection data?

Apologies if there is a common sense solution that I’m not seeing, I’m fairly new to web development!

Thanks!

by default postgres server is open with no password to the same computer as the server (localhost)
you need to edit the hba file to prevent it.

the line

host    all         all         127.0.0.1/32          trust

“trust” means no password for this host.

1 Like