-
Notifications
You must be signed in to change notification settings - Fork 80
Expose apiPort via commndline #1481
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
Expose apiPort via commndline #1481
Conversation
|
Cool! We'll review in the next couple of days. Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds support for configuring the Dev Proxy API port via the --api-port command-line option, allowing users to dynamically set the API port at runtime instead of only through configuration files.
Key changes:
- Made
IProxyConfiguration.ApiPortsettable to support runtime configuration - Added
--api-portcommand-line option with a default value of 8897 - Integrated the new option into command-line parsing and application startup logic
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| DevProxy.Abstractions/Proxy/IProxyConfiguration.cs | Changed ApiPort property from read-only to settable to support runtime configuration |
| DevProxy/Commands/DevProxyCommand.cs | Added --api-port option definition with description and help text, and configuration logic to apply the parsed value |
| DevProxy/Commands/DevProxyConfigOptions.cs | Added ApiPort property and option registration for initial parsing |
| DevProxy/Program.cs | Updated Kestrel configuration to use the command-line option with fallback to configuration file |
|
Hi @waldekmastykarz @garrytrinder Where and how I do sign this, Contributor License Agreement is not agreed yet. |
|
@niteshsinghal85 usually a link is provided in the PR for you to follow. Leave it with me, I'll see what I can find. |
|
@dotnet-policy-service agree |
thanks for your guidance. |
|
@waldekmastykarz @garrytrinder can you complete the PR |
|
Yes, now I can, I guess you found the link 😊 |
|
@niteshsinghal85 we will merge this PR (and others) in the new year when we will release a new beta version of Dev Proxy. Thanks again for your contribution! |
Fixes #1472
Added support for configuring the Dev Proxy API port via the --api-port command-line option.
This allows users to dynamically set the API port at runtime instead of only through configuration files.
The change makes IProxyConfiguration.ApiPort settable and integrates the new option into the command-line parsing logic with a default value of 8897.