1
0
mirror of https://github.com/alm494/sql_proxy.git synced 2025-10-08 22:01:51 +02:00

fixed binding to all ip addresses

This commit is contained in:
Almaz Sharipov
2025-05-07 16:53:24 +03:00
parent 0dc65205e9
commit 78ac5fce67

View File

@@ -19,6 +19,9 @@ func main() {
// Application params taken from OS environment
app.Log.SetLevel(logrus.Level(app.GetEnvInt("LOG_LEVEL", 2)))
bindAddress := app.GetEnvString("BIND_ADDR", "localhost")
if bindAddress == "*" {
bindAddress = ""
}
bindPort := app.GetEnvInt("BIND_PORT", 8080)
db.MaxRows = uint32(app.GetEnvInt("MAX_ROWS", 10000))
tlsCert := app.GetEnvString("TLS_CERT", "")