move derp.go to derp module

Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>
This commit is contained in:
Kristoffer Dalby 2023-06-06 10:41:30 +02:00 committed by Kristoffer Dalby
parent 2289a2acbf
commit 8c4c4c8633
6 changed files with 57 additions and 56 deletions

View file

@ -7,6 +7,7 @@ import (
"net/http"
"github.com/gorilla/mux"
"github.com/juanfont/headscale/hscontrol/types"
"github.com/rs/zerolog/log"
"golang.org/x/net/http2"
"golang.org/x/net/http2/h2c"
@ -100,12 +101,12 @@ func (h *Headscale) NoiseUpgradeHandler(
router.HandleFunc("/machine/map", noiseServer.NoisePollNetMapHandler)
server := http.Server{
ReadTimeout: HTTPReadTimeout,
ReadTimeout: types.HTTPReadTimeout,
}
noiseServer.httpBaseConfig = &http.Server{
Handler: router,
ReadHeaderTimeout: HTTPReadTimeout,
ReadHeaderTimeout: types.HTTPReadTimeout,
}
noiseServer.http2Server = &http2.Server{}