Tweak
This commit is contained in:
parent
d29d0222af
commit
e69176e200
2 changed files with 5 additions and 4 deletions
4
app.go
4
app.go
|
@ -128,8 +128,8 @@ func NewHeadscale(cfg *Config) (*Headscale, error) {
|
||||||
cfg.DBuser,
|
cfg.DBuser,
|
||||||
)
|
)
|
||||||
|
|
||||||
if s, err := strconv.ParseBool(cfg.DBssl); err == nil {
|
if sslEnabled, err := strconv.ParseBool(cfg.DBssl); err == nil {
|
||||||
if !s {
|
if !sslEnabled {
|
||||||
dbString += " sslmode=disable"
|
dbString += " sslmode=disable"
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -137,14 +137,15 @@ db_path: ./db.sqlite
|
||||||
|
|
||||||
# # Postgres config
|
# # Postgres config
|
||||||
# If using a Unix socket to connect to Postgres, set the socket path in the 'host' field and leave 'port' blank.
|
# If using a Unix socket to connect to Postgres, set the socket path in the 'host' field and leave 'port' blank.
|
||||||
# Also if other 'sslmode' is required instead of 'require(true)' and 'disabled(false)', set the 'sslmode' you need
|
|
||||||
# in the 'db_ssl' field. Refers to https://www.postgresql.org/docs/current/libpq-ssl.html Table 34.1.
|
|
||||||
# db_type: postgres
|
# db_type: postgres
|
||||||
# db_host: localhost
|
# db_host: localhost
|
||||||
# db_port: 5432
|
# db_port: 5432
|
||||||
# db_name: headscale
|
# db_name: headscale
|
||||||
# db_user: foo
|
# db_user: foo
|
||||||
# db_pass: bar
|
# db_pass: bar
|
||||||
|
|
||||||
|
# If other 'sslmode' is required instead of 'require(true)' and 'disabled(false)', set the 'sslmode' you need
|
||||||
|
# in the 'db_ssl' field. Refers to https://www.postgresql.org/docs/current/libpq-ssl.html Table 34.1.
|
||||||
# db_ssl: false
|
# db_ssl: false
|
||||||
|
|
||||||
### TLS configuration
|
### TLS configuration
|
||||||
|
|
Loading…
Reference in a new issue