Stop using pointers for nested config structs, closes #41
This commit is contained in:
parent
540efa03c4
commit
855f4d3e64
@ -15,9 +15,9 @@ type Config struct {
|
|||||||
HexIP bool
|
HexIP bool
|
||||||
VerifyCertificates bool `mapstructure:"verify_certificates"`
|
VerifyCertificates bool `mapstructure:"verify_certificates"`
|
||||||
Headers map[string]string
|
Headers map[string]string
|
||||||
Defaults *Defaults
|
Defaults Defaults
|
||||||
HTTPS *HTTPS
|
HTTPS HTTPS
|
||||||
LetsEncrypt *LetsEncrypt
|
LetsEncrypt LetsEncrypt
|
||||||
}
|
}
|
||||||
|
|
||||||
type Defaults struct {
|
type Defaults struct {
|
||||||
@ -36,7 +36,7 @@ type HTTPS struct {
|
|||||||
Port string
|
Port string
|
||||||
Cert string
|
Cert string
|
||||||
Key string
|
Key string
|
||||||
HSTS *HSTS
|
HSTS HSTS
|
||||||
}
|
}
|
||||||
|
|
||||||
type HSTS struct {
|
type HSTS struct {
|
||||||
|
@ -47,7 +47,7 @@ func (d *Dispatch) getIndexData(r *http.Request, path string, state *State) *ind
|
|||||||
cfg := d.Config()
|
cfg := d.Config()
|
||||||
|
|
||||||
data := indexData{
|
data := indexData{
|
||||||
Defaults: cfg.Defaults,
|
Defaults: &cfg.Defaults,
|
||||||
HexIP: cfg.HexIP,
|
HexIP: cfg.HexIP,
|
||||||
Version: dispatchVersion{
|
Version: dispatchVersion{
|
||||||
Tag: version.Tag,
|
Tag: version.Tag,
|
||||||
|
Loading…
Reference in New Issue
Block a user