@@ -20,8 +20,8 @@ const (
20
20
rootPath = "/"
21
21
)
22
22
23
- // baseHeaders contains the constant headers set in each server block
24
- var baseHeaders = []http.Header {
23
+ // httpBaseHeaders contains the constant headers set in each HTTP server block
24
+ var httpBaseHeaders = []http.Header {
25
25
{
26
26
Name : "Host" ,
27
27
Value : "$gw_api_compliant_host" ,
@@ -30,25 +30,31 @@ var baseHeaders = []http.Header{
30
30
Name : "X-Forwarded-For" ,
31
31
Value : "$proxy_add_x_forwarded_for" ,
32
32
},
33
- }
34
-
35
- // httpBaseHeaders contains the constant headers set in each HTTP server block
36
- var httpBaseHeaders = append (baseHeaders ,
37
- http.Header {
33
+ {
38
34
Name : "Upgrade" ,
39
35
Value : "$http_upgrade" ,
40
36
},
41
- http. Header {
37
+ {
42
38
Name : "Connection" ,
43
39
Value : "$connection_upgrade" ,
44
- })
40
+ },
41
+ }
45
42
46
43
// grpcBaseHeaders contains the constant headers set in each gRPC server block
47
- var grpcBaseHeaders = append (baseHeaders ,
48
- http.Header {
44
+ var grpcBaseHeaders = []http.Header {
45
+ {
46
+ Name : "Host" ,
47
+ Value : "$gw_api_compliant_host" ,
48
+ },
49
+ {
50
+ Name : "X-Forwarded-For" ,
51
+ Value : "$proxy_add_x_forwarded_for" ,
52
+ },
53
+ {
49
54
Name : "Authority" ,
50
55
Value : "$gw_api_compliant_host" ,
51
- })
56
+ },
57
+ }
52
58
53
59
func executeServers (conf dataplane.Configuration ) []executeResult {
54
60
servers , httpMatchPairs := createServers (conf .HTTPServers , conf .SSLServers )
0 commit comments