feat(proxy-route): allow disabling HTTP/2 per route

This commit is contained in:
ryan
2026-10-07 10:30:16 +08:00
parent 0bebca2990
commit 7ad25f61aa
20 changed files with 100 additions and 14 deletions
@@ -113,6 +113,14 @@ func populateProxyRouteFields(
route.UpstreamType = upstreamType
}
func applyProxyRouteHTTP2(route *model.ProxyRoute, input Input) {
if input.EnableHTTP2 != nil {
route.EnableHTTP2 = *input.EnableHTTP2
} else if route.ID == 0 {
route.EnableHTTP2 = true
}
}
func applyProxyRouteUpstreamType(ctx context.Context, route *model.ProxyRoute, upstreamType string, input Input) error {
switch upstreamType {
case proxyRouteUpstreamTypeTunnel: