proxy-wasm-http-header-rename

command module
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 14, 2024 License: MIT Imports: 2 Imported by: 0

README

proxy-wasm-http-header-rename

A proxy-wasm compliant WebAssembly module for renaming HTTP Headers.

Usage

  1. Download the latest WebAssembly module binary from the release page.

  2. Configure the proxy to use the WebAssembly module like below (this assumes Envoy as the proxy):

listeners:
  - name: example
    filter_chains:
      - filters:
          - name: envoy.filters.network.http_connection_manager
            typed_config:
              # ...
              http_filters:
                - name: envoy.filters.http.wasm
                  typed_config:
                    '@type': type.googleapis.com/udpa.type.v1.TypedStruct
                    type_url: type.googleapis.com/envoy.extensions.filters.http.wasm.v3.Wasm
                    value:
                      config:
                        vm_config:
                          runtime: envoy.wasm.runtime.v8
                          code:
                            local:
                              filename: /etc/envoy/proxy-wasm-http-header-rename.wasm
                        configuration:
                          "@type": type.googleapis.com/google.protobuf.StringValue
                          value: |
                            {
                              "request_headers_to_rename": [
                                {
                                  "header": {
                                    "key": "original-header-name",
                                    "value": "new-header-name"
                                  }
                                }
                              ]
                            }
                - name: envoy.filters.http.router
                  typed_config:
                    '@type': type.googleapis.com/envoy.extensions.filters.http.router.v3.Router
# ...

Motivation

For now, Envoy does not support renaming HTTP Headers natively as described in this issue. So, we can use this WebAssembly module to rename HTTP Headers until the issue is resolved.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL