mirror of
https://github.com/tailscale/tailscale.git
synced 2026-12-04 15:42:20 -08:00
cmd/derper: also add port 80 timeouts
Didn't notice this one in earlier 00b3c1c042
Updates tailscale/corp#2486
Signed-off-by: Brad Fitzpatrick <[email protected]>
This commit is contained in:
1 parent
3c8ca4b357
commit
7a7aa8f2b0
1 file changed
+7
-1
@@ -225,7 +225,13 @@ func main() {
|
||||
return cert, nil
|
||||
}
|
||||
go func() {
|
||||
err := http.ListenAndServe(":80", certManager.HTTPHandler(tsweb.Port80Handler{Main: mux}))
|
||||
port80srv := &http.Server{
|
||||
Addr: ":80", // the default, but to be explicit
|
||||
Handler: certManager.HTTPHandler(tsweb.Port80Handler{Main: mux}),
|
||||
ReadTimeout: 30 * time.Second,
|
||||
WriteTimeout: 30 * time.Second,
|
||||
}
|
||||
err := port80srv.ListenAndServe()
|
||||
if err != nil {
|
||||
if err != http.ErrServerClosed {
|
||||
log.Fatal(err)
|
||||
|
||||
Reference in new issue
Block a user