Comments (3)
grpc based on http2, I think you should use bodyChunk replace body
I add header&body to metadata, so i can access it in access_log, like this request_body: "%DYNAMIC_METADATA(envoy.lua.log:request_body)%"
function envoy_on_request(handle)
local headers = {}
for k, v in pairs(handle:headers()) do
headers[k] = v
end
handle:streamInfo():dynamicMetadata():set(
"envoy.lua.log", "request_headers", headers)
local md = handle:headers():get(":method")
if md ~= "POST" and md ~= "PUT" then return end
local n = 0
local body = ""
for chunk in handle:bodyChunks() do
body = body..chunk:getBytes(0, chunk:length())
n = n + chunk:length()
if n > 10240 then break end
end
if n > 0 then
if handle:headers():get("content-type") == "application/grpc" then
handle:streamInfo():dynamicMetadata():set(
"envoy.lua.log", "request_body", handle:base64Escape(body))
else
handle:streamInfo():dynamicMetadata():set(
"envoy.lua.log", "request_body", body)
end
end
end
from istio.
Related Issues (20)
- Gateway configured with wildcard certificate cannot configure ProtocolVersion for individual hosts.
- feature: overload protect by connection limit
- Second Telemetry API doesn't take effect HOT 2
- What values to set for METRIC_ROTATION_INTERVAL / METRIC_GRACEFUL_DELETION_INTERVAL HOT 1
- Use the ISTIO_MULTIROOT_MESH to rotate root certificates
- Implicit allow from waypoint HOT 1
- Ambient: Envoy clients do not respect a pod dynamically enrolling/leaving "ambient enabled"
- TestNodeUntainterOnlyUntaintsWhenIstiocniInourNs test flake
- TestTraffic/virtualservice test flake
- Istio update from 1.19.6 to 1.20.5 multi-cluster TLS Error HOT 2
- Write a VAP for Istio annotations and labels HOT 2
- Change in behavior of ServiceEntries merge HOT 22
- Enrich the debug API to dump the configuration from configStore HOT 2
- Unexpected matchlabels added
- Istio merges non-Istio conditions into the Istio-controlled status stanzas of HTTPRoutes
- Add a flag to be able to increase the timeout in retries for the integration test
- Incomplete CDS response cause cluster_not_found error during xds update HOT 5
- helm install base output message can be improved HOT 2
- Improve message from helm install istiod on next step HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from istio.