Add transparent proxy endpoint for RDI native API - #6468
Draft
ArtemHoruzhenko wants to merge 1 commit into
Draft
Conversation
ArtemHoruzhenko
force-pushed
the
feature/rdi-ui/proxy-endpoint
branch
from
September 1, 2026 09:46
26b2880 to
fae4cd3
Compare
Contributor
Code Coverage - Backend unit tests
Test suite run success3813 tests passing in 330 suites. Report generated by 🧪jest coverage report action from 4657769 |
Contributor
Code Coverage - Integration Tests
|
Adds rdi/:id/proxy/* forwarding an arbitrary request to an RDI instance's native API, with credentials and TLS handling staying server-side and CORS avoided entirely since the browser only talks to RedisInsight. Needed by the upcoming rdi-ui integration: the @rdi-ui/pipeline package ships its own SDK that speaks the native RDI API directly rather than RedisInsight's curated /rdi/:id/pipeline endpoints, so this passthrough gives it something real to call. RdiClient gains an abstract proxyRequest() method, implemented once on ApiRdiClient (ApiV2RdiClient inherits it). Hop-by-hop, auth, and transport-level headers are stripped in both directions.
ArtemHoruzhenko
force-pushed
the
feature/rdi-ui/proxy-endpoint
branch
from
September 1, 2026 10:13
fae4cd3 to
4657769
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Fourth PR in the rdi-ui integration chain (stacked on #6467, which is stacked on #6465/#6464).
Adds
rdi/:id/proxy/*, a transparent passthrough to an RDI instance's native API. The upcoming@rdi-ui/pipelinepackage ships its own SDK (@rdi-ui/sdk) that speaks the native RDI API directly rather than RedisInsight's curated/rdi/:id/pipelineendpoints. This proxy gives it something real to call while keeping credentials and TLS handling entirely server-side.Key points:
RdiClientneeds a new method (proxyRequest, declared on the abstractRdiClient, implemented once onApiRdiClient, inherited byApiV2RdiClient): the authenticated connection (bearer token, self-signed-cert TLS bypass) only exists inside that class;RdiClientProvider.getOrCreate()returns the abstractRdiClienttype, so every other RDI capability is already exposed this same way. Reusing it avoids re-implementing login/token-refresh in the proxy layer.authorization/cookiewould override the RDI client's own bearer token or leak RedisInsight's session; forwarding originalcontent-length/content-encodingon the response would corrupt it in the browser once axios has already decompressed the body. Hop-by-hop headers (connection,te,trailer, etc.) are never proxy-safe per RFC 7230.Testing
npm run lint:apiandnpm run type-check --prefix redisinsight/api(0 new errors) pass.RdiProxyService,RdiProxyController, andApiRdiClient.proxyRequest(incl. non-2xx passthrough).rdimodule test suite (293 tests) still passes.No ticket yet.