-
Notifications
You must be signed in to change notification settings - Fork 396
feat(cli): add HTTPS proxy support for development apps #690
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
feat(cli): add HTTPS proxy support for development apps #690
Conversation
|
We require contributors to sign our Contributor License Agreement, and we don"t have @justAkshitAgrawal on file. In order for us to review and merge your code, please follow our CLA guidelines. |
|
@justAkshitAgrawal is attempting to deploy a commit to the stagewise Team on Vercel. A member of the Team first needs to authorize it. |
WalkthroughAdds HTTPS proxy support for development apps with self-signed certificates. Introduces a new CLI flag (--app-https), config schema/type updates, resolves the flag into the runtime Config, and updates the dev proxy to pick https or http accordingly and disable TLS verification via secure: false. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant U as User
participant CLI as CLI (argparse)
participant RC as Config Resolver
participant PS as Proxy Server
participant DA as Dev App (http/https)
U->>CLI: Run stagewise ... [--app-https]
CLI->>RC: Provide parsed options (appHttps?)
RC->>RC: Merge CLI + config file -> Config.appHttps
RC-->>PS: Start proxy with Config (appHttps)
alt Config.appHttps = true
note over PS,DA: HTTPS route (self-signed allowed)
PS->>DA: HTTPS request (TLS verify disabled: secure=false)
else Config.appHttps = false
PS->>DA: HTTP request
end
DA-->>PS: Response
PS-->>U: Proxied response
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested reviewers
Poem
Pre-merge checks and finishing touches✅ Passed checks (5 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (6)
🧰 Additional context used📓 Path-based instructions (3)apps/!(toolbar)/**📄 CodeRabbit inference engine (.cursor/rules/precommit.mdc)
Files:
apps/cli/**/*.{ts,js,tsx}📄 CodeRabbit inference engine (apps/cli/CLAUDE.md)
Files:
**/*.{ts,tsx}📄 CodeRabbit inference engine (CLAUDE.md)
Files:
🧬 Code graph analysis (1)apps/cli/src/config/index.ts (1)
🔇 Additional comments (15)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Hi @justAkshitAgrawal, thanks for the PR! I will have a look at the implementation and test it, please sign the cla in the meanwhile, so you're an official contributor 😁 |
Description of Changes
Added support for proxying HTTPS development applications with self-signed certificates through a new
--app-httpsCLI flag andappHttpsconfiguration option.Changes include:
--app-httpsCLI flag to enable HTTPS proxyingappHttpsboolean option instagewise.jsonconfig filesecure: falseto accept self-signed certificatesfalse(HTTP) for backward compatibilityMotivation and Context
Fixes #689
Some development setups require HTTPS, particularly:
Previously, the CLI could only proxy HTTP applications. When users tried to proxy HTTPS apps (like a host app on port 8181), the connection would fail with "socket hang up" errors because the proxy was hardcoded to use HTTP.
This change enables the CLI to work with HTTPS development apps, making it compatible with more complex development setups like Module Federation micro-frontends.
Usage: