diff options
author | Alan Pearce | 2024-04-25 13:02:22 +0200 |
---|---|---|
committer | Alan Pearce | 2024-04-25 13:02:22 +0200 |
commit | a1d11d3e69650d9b43ca1b1d7b7ccc05a808d5c1 (patch) | |
tree | 964b220c2e36308ada68c19d6a7f1e5722631003 | |
parent | fd67b19b5c7f76f0c3579e8a05ef20a618e90be7 (diff) | |
download | website-a1d11d3e69650d9b43ca1b1d7b7ccc05a808d5c1.tar.lz website-a1d11d3e69650d9b43ca1b1d7b7ccc05a808d5c1.tar.zst website-a1d11d3e69650d9b43ca1b1d7b7ccc05a808d5c1.zip |
remove unused redirect_other_hostnames config option
-rw-r--r-- | config.toml | 1 | ||||
-rw-r--r-- | internal/config/config.go | 21 | ||||
-rw-r--r-- | internal/server/server.go | 9 |
3 files changed, 14 insertions, 17 deletions
diff --git a/config.toml b/config.toml index e79653d..85ec950 100644 --- a/config.toml +++ b/config.toml @@ -1,6 +1,5 @@ default_language = "en-GB" base_url = "https://alanpearce.eu" -redirect_other_hostnames = true title = "Alan Pearce" email = "alan@alanpearce.eu" diff --git a/internal/config/config.go b/internal/config/config.go index 3abe6a6..ff213ac 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -30,17 +30,16 @@ func (u *URL) UnmarshalText(text []byte) (err error) { } type Config struct { - DefaultLanguage string `toml:"default_language"` - BaseURL URL `toml:"base_url"` - RedirectOtherHostnames bool `toml:"redirect_other_hostnames"` - Production bool - Title string - Email string - Description string - DomainStartDate string `toml:"domain_start_date"` - OriginalDomain string `toml:"original_domain"` - Taxonomies []Taxonomy - Extra struct { + DefaultLanguage string `toml:"default_language"` + BaseURL URL `toml:"base_url"` + Production bool + Title string + Email string + Description string + DomainStartDate string `toml:"domain_start_date"` + OriginalDomain string `toml:"original_domain"` + Taxonomies []Taxonomy + Extra struct { Headers map[string]string } Menus map[string][]MenuItem diff --git a/internal/server/server.go b/internal/server/server.go index d414d71..e5e8df8 100644 --- a/internal/server/server.go +++ b/internal/server/server.go @@ -24,11 +24,10 @@ var Commit string var config *cfg.Config type Config struct { - Production bool `conf:"default:false"` - ListenAddress string `conf:"default:localhost"` - Port string `conf:"default:3000,short:p"` - BaseURL cfg.URL `conf:"default:http://localhost:3000,short:b"` - RedirectOtherHostnames bool `conf:"default:false"` + Production bool `conf:"default:false"` + ListenAddress string `conf:"default:localhost"` + Port string `conf:"default:3000,short:p"` + BaseURL cfg.URL `conf:"default:http://localhost:3000,short:b"` } type HTTPError struct { |