Skip to content
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

Handle invalid proxy URLs #331

Merged
merged 2 commits into from
Jan 27, 2025
Merged

Handle invalid proxy URLs #331

merged 2 commits into from
Jan 27, 2025

Conversation

breedloj
Copy link
Contributor

Description of changes:
Validates that configured (via preference) or passed (via environment variable) proxy URLs are valid before using them. URLs are parsed for correctness and ignored if invalid. Additionally, a prompt is shown to the user.

Screenshot 2025-01-24 at 2 38 00 PM

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

}
} catch (IllegalArgumentException e) {
if (!hasSeenInvalidProxyNotification) {
hasSeenInvalidProxyNotification = true;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If a user sees this the first time, closes the display. Goes back and changes the proxy url but still does fix the format correctly, will they not see this popup then?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a good point. We don't currently evaluate or attempt to use the proxy URL until the IDE is restarted. This is an overall area for improvement - ideally we can hot swap to the new setting without the need for a restart. The current logic works within our existing constraints. Input validation would also help address this. I'll create a backlog item.

@breedloj breedloj merged commit 722fe4d into main Jan 27, 2025
1 check passed
@breedloj breedloj deleted the breedloj/proxyUrl branch January 27, 2025 19:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants