Skip to content

Default SQLPage Listener Should be Localhost Instead of 0.0.0.0 #387

@amrutadotorg

Description

@amrutadotorg

Hi, here is my config

{
    "database_url": "postgres://postgres:pass@localhost:5432/pp?application_name=my_application",
    "environment": "development"
}

when I run the sqlpage (tested on macOS version) it prints

[2024-06-09T11:00:24.313Z INFO  sqlpage::webserver::http] Will start HTTP server on 0.0.0.0:8080
[2024-06-09T11:00:24.314Z INFO  sqlpage] Server started successfully.
        SQLPage is now listening on http://127.0.0.1:8080

but in fact it listens on *

❯ lsof -i :8080

COMMAND     PID USER   FD   TYPE            DEVICE SIZE/OFF NODE NAME
sqlpage.b 34892    r   12u  IPv4 0xeed33cf6542d0eb      0t0  TCP *:http-alt (LISTEN)

adding to the config "listen_on": "127.0.0.1:8080" shows that the sqlpage listens on localhost only

sqlpage.b 34923 user 12u IPv4 0x5c3bcf833f5ba732 0t0 TCP localhost:http-alt (LISTEN)

I would suggest that SQLPage should always listen on localhost as default.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions