docs: fix incorrect proxy-defaults config in Lua Envoy extension (#18418)

fix incorrect proxy-defaults config
pull/18437/head
Gerard Nguyen 1 year ago committed by GitHub
parent bb1a288b74
commit 10f69d86d0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -42,15 +42,17 @@ The following example configures the Lua Envoy extension on every service by usi
<CodeBlockConfig filename="lua-envoy-extension-proxy-defaults.hcl">
```hcl
Kind = "proxy-defaults"
Name = "global"
Protocol = "http"
Kind = "proxy-defaults"
Name = "global"
Config {
protocol = "http"
}
EnvoyExtensions {
Name = "builtin/lua"
Arguments = {
ProxyType = "connect-proxy"
Listener = "inbound"
Script = <<-EOS
Script = <<-EOF
function envoy_on_request(request_handle)
meta = request_handle:streamInfo():dynamicMetadata()
m = meta:get("consul")
@ -59,7 +61,7 @@ function envoy_on_request(request_handle)
request_handle:headers():add("x-consul-datacenter", m["datacenter"])
request_handle:headers():add("x-consul-trust-domain", m["trust-domain"])
end
EOS
EOF
}
}
```

Loading…
Cancel
Save