diff options
author | Alan Pearce | 2024-07-02 11:47:36 +0200 |
---|---|---|
committer | Alan Pearce | 2024-07-02 11:47:36 +0200 |
commit | b22ceb6c830f07061e5e16e1428438b495efe9d6 (patch) | |
tree | d84d2cc9c0c58b3ceeb33458f37691473f3457a9 /internal/server/server.go | |
parent | a14e030b41799ea65e026d600ce18a48507bebd0 (diff) | |
download | website-b22ceb6c830f07061e5e16e1428438b495efe9d6.tar.lz website-b22ceb6c830f07061e5e16e1428438b495efe9d6.tar.zst website-b22ceb6c830f07061e5e16e1428438b495efe9d6.zip |
fix inconsistent handling of IPv6 listen address
Diffstat (limited to 'internal/server/server.go')
-rw-r--r-- | internal/server/server.go | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/internal/server/server.go b/internal/server/server.go index 203c5c5..8523bc9 100644 --- a/internal/server/server.go +++ b/internal/server/server.go @@ -15,9 +15,9 @@ import ( "go.alanpearce.eu/website/internal/builder" cfg "go.alanpearce.eu/website/internal/config" - "go.alanpearce.eu/x/log" "go.alanpearce.eu/website/internal/vcs" "go.alanpearce.eu/website/internal/website" + "go.alanpearce.eu/x/log" "github.com/ardanlabs/conf/v3" "github.com/osdevisnot/sorvor/pkg/livereload" @@ -134,7 +134,6 @@ func New(runtimeConfig *Config, log *log.Logger) (*Server, error) { applyDevModeOverrides(config, runtimeConfig) } - listenAddress := net.JoinHostPort(runtimeConfig.ListenAddress, strconv.Itoa(runtimeConfig.Port)) top := http.NewServeMux() err = rebuild(builderConfig, config, log) @@ -210,7 +209,6 @@ func New(runtimeConfig *Config, log *log.Logger) (*Server, error) { ReadTimeout: 1 * time.Minute, WriteTimeout: 2 * time.Minute, IdleTimeout: 10 * time.Minute, - Addr: listenAddress, Handler: top, }, redirectServer: &http.Server{ @@ -218,7 +216,6 @@ func New(runtimeConfig *Config, log *log.Logger) (*Server, error) { ReadTimeout: 1 * time.Minute, WriteTimeout: 2 * time.Minute, IdleTimeout: 10 * time.Minute, - Addr: listenAddress, Handler: rMux, }, log: log, |