1
0
mirror of https://github.com/juanfont/headscale.git synced 2024-12-20 19:09:07 +01:00
This commit is contained in:
Orville Q. Song 2022-11-24 20:02:34 +08:00 committed by Kristoffer Dalby
parent d29d0222af
commit e69176e200
2 changed files with 5 additions and 4 deletions

4
app.go
View File

@ -128,8 +128,8 @@ func NewHeadscale(cfg *Config) (*Headscale, error) {
cfg.DBuser,
)
if s, err := strconv.ParseBool(cfg.DBssl); err == nil {
if !s {
if sslEnabled, err := strconv.ParseBool(cfg.DBssl); err == nil {
if !sslEnabled {
dbString += " sslmode=disable"
}
} else {

View File

@ -137,14 +137,15 @@ db_path: ./db.sqlite
# # Postgres config
# 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_host: localhost
# db_port: 5432
# db_name: headscale
# db_user: foo
# 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
### TLS configuration