refactor: new architecture#7
Merged
Merged
Conversation
…lones Non-OIDC buckets now return Cow::Borrowed, eliminating a HashMap clone on every request. OIDC buckets return Cow::Owned with injected temporary credentials. Multipart PendingRequest uses into_owned() since it needs ownership. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ch routing Introduces a RouteHandler trait that allows request interception before the main proxy dispatch pipeline. Handlers are checked in registration order and can short-circuit with a HandlerAction. Includes RequestInfo struct for passing parsed request metadata to handlers. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Rename the core handler struct to Gateway to better reflect its role as the single entry point for request processing. Add route_handlers field and handle() method that checks registered RouteHandlers before falling through to the proxy dispatch pipeline. A ProxyHandler type alias preserves backwards compatibility. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Extract OIDC discovery endpoint handling into a RouteHandler implementation. Serves openid-configuration and JWKS JSON responses. Also adds ProxyResult::json() helper to simplify JSON response construction from downstream crates. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Extract STS request handling into a RouteHandler implementation that delegates to the existing try_handle_sts() function. Also adds ProxyResult::xml() helper for constructing XML responses. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace inline OIDC discovery and STS interception code in all three runtimes (server, lambda, cf-workers) with registered route handlers on the Gateway. Each runtime now uses Gateway::handle() as the single entry point, eliminating ~200 lines of duplicated pre-dispatch logic. AppState structs are simplified by removing sts_config, jwks_cache, token_key, and oidc_discovery fields — these are now owned by the route handlers registered on the gateway. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add GatewayResponse<Body> enum and handle_request() method that resolves NeedsBody internally via a body-collection closure. The body is passed through untouched for Forward (preserving zero-copy streaming), and only materialized via the closure for multipart operations. Runtimes now match on two variants instead of three, with body collection handled lazily by the gateway. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
ef0a44d to
0be16a1
Compare
8e40690 to
1abe0de
Compare
|
🚀 Latest commit deployed to https://multistore-proxy-pr-7.alukach.workers.dev
|
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.
No description provided.