.
This commit is contained in:
@@ -17,6 +17,7 @@ type Config struct {
|
||||
ListenAddr string // Address to listen on
|
||||
TLSCert string // TLS certificate file
|
||||
TLSKey string // TLS key file
|
||||
MaxResponseSize int // Max response size in bytes
|
||||
}
|
||||
|
||||
var CONFIG Config //nolint:gochecknoglobals
|
||||
@@ -47,6 +48,7 @@ func GetConfig() *Config {
|
||||
listen := flag.String("listen", "localhost:1965", "Address to listen on")
|
||||
tlsCert := flag.String("tls-cert", "certs/server.crt", "TLS certificate file")
|
||||
tlsKey := flag.String("tls-key", "certs/server.key", "TLS key file")
|
||||
maxResponseSize := flag.Int("max-response-size", 5_242_880, "Max response size in bytes")
|
||||
|
||||
flag.Parse()
|
||||
|
||||
@@ -71,5 +73,6 @@ func GetConfig() *Config {
|
||||
ListenAddr: *listen,
|
||||
TLSCert: *tlsCert,
|
||||
TLSKey: *tlsKey,
|
||||
MaxResponseSize: *maxResponseSize,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user