Conversation
Gateway: - Split gateway.rs into sub-modules (forward, mitm, tunnel, response) - Add unconnected app response: when no credentials are injected and upstream returns 401/403 for a known app, return actionable JSON error with provider name and connect URL - Force MITM for known app hosts even without credentials so the interception can detect auth failures - Add display_name to app provider registry with path-aware lookup for shared hosts (www.googleapis.com disambiguates by path prefix) Environment: - Centralize all process.env reads into lib/env.ts - Add NEXT_PUBLIC_APP_URL and APP_URL to docker-compose derived from ONECLI_BIND_HOST - Gateway reads APP_URL for full dashboard URL in connect_url Cache invalidation: - Add gateway cache invalidation on app connect (API key) and disconnect (CLI routes) - Add client-side cache invalidation on OAuth connect and disconnect via useInvalidateGatewayCache in apps-tab and app-detail - Remove broken invalidation from OAuth callback (cross-origin redirect has no auth cookie)
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.
Summary
gateway.rs(1012 lines) into sub-modules:forward.rs(request forwarding),mitm.rs(TLS interception),tunnel.rs(TCP tunnel),response.rs(error responses)www.googleapis.comare disambiguated by request path prefix (Gmail vs Calendar vs Drive)process.envreads moved tolib/env.ts— single source of truth for defaults and namingNEXT_PUBLIC_APP_URLandAPP_URLderived fromONECLI_BIND_HOSTTest plan
pnpm checkpasses (lint + types + format)cargo test— all 154 gateway tests passcurlthrough proxy to unconnected app → getapp_not_connectedJSON responsecurlthrough proxy to connected app → get real API responsecurltowww.googleapis.com/calendar/...without Calendar connected → says "Google Calendar" not "Gmail"