Add support for grpc_set_header
This commit is contained in:
parent
7ef8a0a775
commit
ff3e182350
13 changed files with 248 additions and 46 deletions
|
|
@ -152,6 +152,7 @@ var (
|
|||
"buildAuthSignURL": buildAuthSignURL,
|
||||
"buildOpentracingLoad": buildOpentracingLoad,
|
||||
"buildOpentracing": buildOpentracing,
|
||||
"proxySetHeader": proxySetHeader,
|
||||
}
|
||||
)
|
||||
|
||||
|
|
@ -895,3 +896,17 @@ func buildOpentracing(input interface{}) string {
|
|||
buf.WriteString("\r\n")
|
||||
return buf.String()
|
||||
}
|
||||
|
||||
func proxySetHeader(loc interface{}) string {
|
||||
location, ok := loc.(*ingress.Location)
|
||||
if !ok {
|
||||
glog.Errorf("expected a '*ingress.Location' type but %T was returned", loc)
|
||||
return "proxy_set_header"
|
||||
}
|
||||
|
||||
if location.GRPC {
|
||||
return "grpc_set_header"
|
||||
}
|
||||
|
||||
return "proxy_set_header"
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue