diff options
author | 2021-07-19 19:31:47 +0200 | |
---|---|---|
committer | 2021-07-19 19:31:47 +0200 | |
commit | 29bdc41baad96752fc18a1cf73e0a14f153b25d1 (patch) | |
tree | 54ca175711d76ad7d20629c9a7ccaf0f1bb59d08 | |
parent | allow different host + accountDomain (#103) (diff) | |
download | gotosocial-29bdc41baad96752fc18a1cf73e0a14f153b25d1.tar.xz |
Config bugfix (#104)
* fix some config bugs
* go fmt
-rw-r--r-- | internal/config/config.go | 2 | ||||
-rw-r--r-- | internal/db/pg/pg.go | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/internal/config/config.go b/internal/config/config.go index 958926975..e2bfd0b68 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -98,7 +98,7 @@ func loadFromFile(path string) (*Config, error) { return nil, fmt.Errorf("could not read file at path %s: %s", path, err) } - config := &Config{} + config := Empty() if err := yaml.Unmarshal(bytes, config); err != nil { return nil, fmt.Errorf("could not unmarshal file at path %s: %s", path, err) } diff --git a/internal/db/pg/pg.go b/internal/db/pg/pg.go index 5301f0410..31312b61e 100644 --- a/internal/db/pg/pg.go +++ b/internal/db/pg/pg.go @@ -148,6 +148,7 @@ func derivePGOptions(c *config.Config) (*pg.Options, error) { case config.DBTLSModeRequire: tlsConfig = &tls.Config{ InsecureSkipVerify: false, + ServerName: c.DBConfig.Address, } } |