about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAlan Pearce2024-04-21 11:22:24 +0200
committerAlan Pearce2024-04-21 11:22:24 +0200
commit5782989df453d0d6da7bb31e40f063cac604924c (patch)
treeab14f066838a9c558ce086edda0a3c79e5410e3a
parent24354d97408619fdb77c982edbefd9dbd82d5fff (diff)
downloadwebsite-5782989df453d0d6da7bb31e40f063cac604924c.tar.lz
website-5782989df453d0d6da7bb31e40f063cac604924c.tar.zst
website-5782989df453d0d6da7bb31e40f063cac604924c.zip
support IPv6
-rw-r--r--nix/default.nix2
-rw-r--r--server.go2
2 files changed, 3 insertions, 1 deletions
diff --git a/nix/default.nix b/nix/default.nix
index d555bbd..063d946 100644
--- a/nix/default.nix
+++ b/nix/default.nix
@@ -17,7 +17,7 @@ let
         Cmd = [ "${server}/bin/website" ];
         Env = [
           "PRODUCTION=true"
-          "LISTEN_ADDRESS="
+          "LISTEN_ADDRESS=::"
           "PORT=${builtins.toString PORT}"
           "ROOT=public"
         ];
diff --git a/server.go b/server.go
index 945ed38..9d04dc1 100644
--- a/server.go
+++ b/server.go
@@ -80,6 +80,7 @@ func main() {
 		DisableDefaultDate:       true,
 		DisableHeaderNormalizing: true,
 		DisableStartupMessage:    true,
+		Network:                  fiber.NetworkTCP,
 	})
 	prometheus := fiberprometheus.New("homestead")
 	prometheus.RegisterAt(metricServer, "/metrics")
@@ -152,6 +153,7 @@ func main() {
 	toplevel := fiber.New(fiber.Config{
 		DisableStartupMessage: runtimeConfig.Production,
 		ServerHeader:          fmt.Sprintf("website (%s)", Commit),
+		Network:               fiber.NetworkTCP,
 	})
 	toplevel.Get("/health", func(c *fiber.Ctx) error {
 		return c.SendStatus(fiber.StatusOK)