2023-01-27 21:37:20 +00:00
|
|
|
// Copyright (c) Tailscale Inc & AUTHORS
|
|
|
|
// SPDX-License-Identifier: BSD-3-Clause
|
2021-12-06 22:58:29 +00:00
|
|
|
|
2022-06-06 21:52:52 +01:00
|
|
|
//go:build !ios && !android && !js
|
2021-12-06 22:58:29 +00:00
|
|
|
|
|
|
|
package ipnlocal
|
|
|
|
|
|
|
|
import (
|
|
|
|
"net/http"
|
|
|
|
|
|
|
|
"golang.org/x/net/http2"
|
|
|
|
"golang.org/x/net/http2/h2c"
|
|
|
|
)
|
|
|
|
|
|
|
|
func init() {
|
|
|
|
addH2C = func(s *http.Server) {
|
|
|
|
h2s := &http2.Server{}
|
|
|
|
s.Handler = h2c.NewHandler(s.Handler, h2s)
|
|
|
|
}
|
|
|
|
}
|