Comments (3)
cc @rshriram @lizan @mattklein123 @alyssawilk
from envoy.
I tried adding an HTTP Lua filter to see if I could modify the ":authority" and it appears to have worked. We really don't want to introduce Lua into our system but this allowed me to test out an option if there is no native configuration way to do this with Envoy. If doing it with code is the only way then we'd much prefer to use the HTTP WASM filter as you can pass dynamic configuration into the filter and we prefer to write Go and compile to WASM. I'm still hoping there is a native way to do this without code.
Here's the code that simply always replaces the upstream port with 80
to see if it was possible. I didn't figure out how to pass dynamic port mappings to the script such as mentioned in the description of this issue.
-- Define the Lua filter
function envoy_on_request(request_handle)
-- Retrieve the destination address and port
local authority_header = request_handle:headers():get(":authority")
local destination_address, existing_port = authority_header:match("^(.-):?(%d*)$")
-- If there's an existing port, remove it
if existing_port then
authority_header = destination_address
end
local destination_port = "80" -- Change this to the desired upstream port
-- Modify the destination port
request_handle:headers():replace(":authority", authority_header .. ":" .. destination_port)
end
from envoy.
We decided to rewrite the Lua as Go code and output WASM and load it as a HTTP WASM filter which also accepts a configuration which is like the port_value
which exists in the SNI dynamic forward proxy. This is the best solution that we could come up with at this time. We are hopeful we missed something within the Envoy configuration.
from envoy.
Related Issues (20)
- IpVersionsClientTypeDeferredProcessing/ExtProcIntegrationTest.SkipHeaderSendTrailerInBufferedMode/IPv4_EnvoyGrpc_NoDeferredProcessing is flakey HOT 1
- Create a benchmark for the admin clusters endpoint HOT 2
- Query - Regarding custom TLS handshaker to load the certs from the cache. HOT 3
- Support fail_traffic_on_panic for locality_weighted_lb_config HOT 2
- Add Meta-Data to Build for more accurate Container SBOM generation HOT 3
- Add custom Envoy cluster-specific Prometheus label HOT 5
- x25519kyber768 support HOT 2
- [oauth2] Refresh flow breaks when id token not returned during refresh HOT 6
- Newer release available `aspect_bazel_lib`: v2.7.2 (current: v2.7.1) HOT 1
- allow fixed heap resource monitor's max_heap_size_bytes to be configurable via runtime HOT 3
- `DirectResponseIntegrationTest.DirectResponseBodySizeLarge/IPv6` is flakey in TSAN test
- aws: assert in debug for async credential providers HOT 2
- Fix CVE-2024-33599 HOT 3
- OpenTelemetry metrics sink and access logger - Ability to configure OpenTelemetry Resource via Resource Detectors HOT 4
- Support typed dynamic filter metadata in access loggers HOT 2
- 503 UC does not get reported as a span. HOT 3
- Newer release available `io_bazel_rules_go`: v0.47.1 (current: v0.46.0) HOT 1
- JWT authn: Logging for cache refresh for JWKS HOT 4
- Issues accessing the SNI (server name) from the TLS inspector within External Authorization CheckRequest HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from envoy.