Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

License

NotificationsYou must be signed in to change notification settings

Swaagie/envoy-rbi-filter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CI workflow

Envoy Response Body Injection filter

Envoy filter written in Rust to provide Reponse Body Injection (RBI). This requiresEnvoy's WASM filters

Build

rustup target add wasm32-wasip1cargo build --target wasm32-wasip1

Release build

rustup target add wasm32-wasip1cargo build --target wasm32-wasip1 --release

Usage

Add the WASM filter configuration tohttp_filters as part of Envoy's HTTP Connection Management configuration.

-name:envoy.filters.http.wasmtyped_config:"@type":type.googleapis.com/udpa.type.v1.TypedStructtype_url:type.googleapis.com/envoy.extensions.filters.http.wasm.v3.Wasmvalue:config:name:"rbi_filter"root_id:"rbi_filter_id"configuration:"@type":"type.googleapis.com/google.protobuf.StringValue"value:|            {              "hello": "<h1>Hello WASM</h1>"            }vm_config:runtime:"envoy.wasm.runtime.v8"vm_id:"rbi_injection_vm_id"code:local:filename:"/etc/envoy/envoy_rbi_filter.wasm"configuration:{}

Example

To run the example local:

cargo build --target wasm32-wasidocker compose up --build --file ./example/docker-compose.yaml

Send the local running cluster traffic:

curl -vvv http://localhost:10000/# *   Trying ::1...# * TCP_NODELAY set# ...# * Connection #0 to host localhost left intact# <html><body><h1>Hello WASM</h1></body></html># * Closing connection 0

Tests

End to end integration tests require theexample to run local.

cargotest

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages


[8]ページ先頭

©2009-2025 Movatter.jp