Replies: 2 comments
-
Retrieving raw HTTP request headers in a Lua script depends on the environment you're working in. If you're using Lua with a web server like Nginx (via OpenResty), you can access headers using ngx.req.get_headers(), which returns a table of all the request headers. For a more raw representation, especially for debugging or logging purposes, you might need to iterate through this table and manually format the headers. In standalone Lua environments, such as with LuaSocket, you’d typically parse the headers manually from the incoming TCP stream. It's also helpful to use a packet capture tool like Wireshark during development for examining actual raw headers sent over the wire. |
Beta Was this translation helpful? Give feedback.
-
Hey, I wanted this in envoy. I am using envoy proxy to forward the requests to my WAF. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I am trying to add WAF as sidecar to envoy gateway, I was able to do this using EnvoyPatchPolicy using lua script, for my use case I need to get the raw http request headers, how can I get the same ?
Beta Was this translation helpful? Give feedback.
All reactions