filter: exposed setSni() function to Lua for setting SNI value for upstream connections#17991
filter: exposed setSni() function to Lua for setting SNI value for upstream connections#17991agrawroh wants to merge 1 commit intoenvoyproxy:mainfrom
Conversation
|
Hi @agrawroh, welcome and thank you for your contribution. We will try to review your Pull Request as quickly as possible. In the meantime, please take a look at the contribution guidelines if you have not done so already. |
362b738 to
0763565
Compare
ca6fc82 to
19c55bb
Compare
There was a problem hiding this comment.
Could we add more realistic test? It means that 1. extract header value (it should be hostname for upstream SNI) 2. call setSni
…stream connections Signed-off-by: Rohit Agrawal <rohit.agrawal@databricks.com>
19c55bb to
ebcbbf8
Compare
I can also open up another small PR for adding the arbitrary header support to |
Cool. If we have auto_sni arbitrary header support, we no longer need lua specific |
@Shikugawa I opened #17995 |
|
With #17995 merged, do we still need this? |
No, I'll close it. |
This PR exposes a new method called
setSni()in the LUA filter to dynamically set the SNI value from the LUA block. Currently, theauto_sni()only looks at the Host/Authority header to set this value and in our use-case we want to use a different header for setting the SNI while sending requests to the upstream clusters.Commit Message: exposed a new
setSni()function to Lua for setting SNI value for upstream connections.Additional Description: Added a new function so that SNI value can be set dynamically from the LUA's
envoy_on_request()block asauto_sni()only supports setting the Host/Authority header value as SNI currently.Risk Level: Low
Testing: Unit Tests, Integration Tests
Docs Changes: Added
setSni()method description in LUA docs.Release Notes: Added
Platform Specific Features: N/A
Signed-off-by: Rohit Agrawal rohit.agrawal@databricks.com