Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
{
"version": "kc-mission-v1",
"name": "envoy-5998-feature-request-in-lua-http-filter-add-ability-to-set-the-contents-of",
"missionClass": "solution",
"author": "KubeStellar Bot",
"authorGithub": "kubestellar",
"mission": {
"title": "envoy: Feature Request: In lua http filter add ability to set the contents of the body",
"description": "Feature Request: In lua http filter add ability to set the contents of the body. Requested by 18+ users.",
"type": "feature",
"status": "completed",
"steps": [
{
"title": "Check current envoy deployment",
"description": "Verify your envoy version and configuration:\n```bash\nkubectl get pods -n envoy -l app.kubernetes.io/name=envoy\nhelm list -n envoy 2>/dev/null || echo \"Not installed via Helm\"\n```\nThis feature requires a working envoy installation."
},
{
"title": "Review envoy configuration",
"description": "Inspect the relevant envoy configuration:\n```bash\nkubectl get all -n envoy -l app.kubernetes.io/name=envoy\nkubectl get configmap -n envoy -l app.kubernetes.io/part-of=envoy\n```\n_Feature Request_: **In lua http filter add ability to set the contents of the body**\n\n```yaml\nfilter_chains:\n- filters:\n - name: envoy.http_connection_manager\n config:\n http_filters:\n - name: envoy.lua\n config:\n "
},
{
"title": "Apply the fix for Feature Request: In lua http filter add ability to set the…",
"description": "Commit Message: This patch adds `setBytes()` API to the buffer wrapper by making the wrapped buffer to be mutable. This allows rewriting upstream data in the response path.\n\nRisk Level: Low\nTesting: Added unit and integration tests.\nDocs Changes: Added\nRelease Notes: Added\n```yaml\nfilter_chains:\n- filters:\n - name: envoy.http_connection_manager\n config:\n http_filters:\n - name: envoy.lua\n config:\n inline_code: |\n function envoy_on_response(response_handle)\n if response_handle:headers():get(\":status\") != \"200\" then\n response_handle:body():set('[]')\n end\n end\n```"
},
{
"title": "Verify the feature works",
"description": "Test that the new capability is working as expected:\n```bash\nkubectl get pods -n envoy -l app.kubernetes.io/name=envoy\nkubectl get events -n envoy --sort-by='.lastTimestamp' | tail -10\n```\nConfirm the feature described in \"Feature Request: In lua http filter add ability to set the…\" is functioning correctly."
}
],
"resolution": {
"summary": "Commit Message: This patch adds `setBytes()` API to the buffer wrapper by making the wrapped buffer to be mutable. This allows rewriting upstream data in the response path.\n\nRisk Level: Low\nTesting: Added unit and integration tests.\nDocs Changes: Added\nRelease Notes: Added",
"codeSnippets": [
"filter_chains:\n- filters:\n - name: envoy.http_connection_manager\n config:\n http_filters:\n - name: envoy.lua\n config:\n inline_code: |\n function envoy_on_response(response_handle)\n if response_handle:headers():get(\":status\") != \"200\" then\n response_handle:body():set('[]')\n end\n end",
"- name: envoy.filters.http.lua\n typed_config:\n \"@type\": type.googleapis.com/envoy.config.filter.http.lua.v2.Lua\n inline_code: |\n function envoy_on_request(request_handle)\n end\n function envoy_on_response(response_handle)\n response_handle:headers():replace(\"content-length\", 6)\n response_handle:body():set(\"hello\\n\")\n end",
"content_length = response_handle:body():set(\"hello\\n\")\nresponse_handle:headers():replace(\"content-length\", content_length)"
]
}
},
"metadata": {
"tags": [
"envoy",
"graduated",
"networking",
"feature"
],
"cncfProjects": [
"envoy"
],
"targetResourceKinds": [],
"difficulty": "beginner",
"issueTypes": [
"feature"
],
"maturity": "graduated",
"sourceUrls": {
"issue": "https://github.com/envoyproxy/envoy/issues/5998",
"repo": "https://github.com/envoyproxy/envoy",
"pr": "https://github.com/envoyproxy/envoy/pull/13172"
},
"reactions": 18,
"comments": 11,
"synthesizedBy": "copilot"
},
"prerequisites": {
"kubernetes": ">=1.24",
"tools": [
"kubectl"
],
"description": "A running Kubernetes cluster with envoy installed or the issue environment reproducible."
},
"security": {
"scannedAt": "2026-03-23T06:32:07.626Z",
"scannerVersion": "cncf-gen-3.0.0",
"sanitized": true,
"findings": []
}
}
Loading