About

This extension serves as a comprehensive reference implementation showcasing most of the available methods in Envoy's Lua HTTP filter API.

Example features in the extension

  • Request and response header manipulation (get, add, replace, remove, iterate)
  • Multiple logging levels (trace, debug, info, warn, err, critical)
  • Stream information access (protocol, route name, addresses, SNI)
  • Dynamic metadata for inter-filter communication
  • SSL/TLS connection inspection (certificates, cipher suites, TLS version)
  • Route and virtual host metadata access
  • Body handling (streaming with bodyChunks, buffered with body)
  • HTTP calls to external services
  • Direct response generation
  • Cryptographic operations (signature verification)
  • Utility functions (base64 encoding, timestamps)

This extension is intended as a learning resource and starting point for developing custom Lua extensions. Most functionality is commented out by default to prevent unintended behavior - uncomment sections as needed.

Usage Examples

Basic Usage

Enable the example Lua extension to add request/response processing

boe run --extension example-lua

With Logging Enabled

Run with debug logging to see all Lua filter output

boe run --extension example-lua --log-level lua:debug