support IPv6
Alan Pearce alan@alanpearce.eu
Sun, 21 Apr 2024 11:22:24 +0200
2 files changed, 3 insertions(+), 1 deletions(-)
jump to
M nix/default.nix → nix/default.nix
@@ -17,7 +17,7 @@ config = { Cmd = [ "${server}/bin/website" ]; Env = [ "PRODUCTION=true" - "LISTEN_ADDRESS=" + "LISTEN_ADDRESS=::" "PORT=${builtins.toString PORT}" "ROOT=public" ];
M server.go → server.go
@@ -80,6 +80,7 @@ StrictRouting: true, DisableDefaultDate: true, DisableHeaderNormalizing: true, DisableStartupMessage: true, + Network: fiber.NetworkTCP, }) prometheus := fiberprometheus.New("homestead") prometheus.RegisterAt(metricServer, "/metrics") @@ -152,6 +153,7 @@ 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)