Add TLS/HTTPS

This commit is contained in:
Philipp Heckel 2021-12-02 08:52:48 -05:00
parent 1e7ae885b4
commit 07a1fe3acb
4 changed files with 52 additions and 6 deletions

View file

@ -27,6 +27,9 @@ const (
// Config is the main config struct for the application. Use New to instantiate a default config struct.
type Config struct {
ListenHTTP string
ListenHTTPS string
KeyFile string
CertFile string
FirebaseKeyFile string
CacheFile string
CacheDuration time.Duration
@ -43,6 +46,9 @@ type Config struct {
func New(listenHTTP string) *Config {
return &Config{
ListenHTTP: listenHTTP,
ListenHTTPS: "",
KeyFile: "",
CertFile: "",
FirebaseKeyFile: "",
CacheFile: "",
CacheDuration: DefaultCacheDuration,