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

Feature: support for skipping requests to some hosts #12

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

alexsorokoletov
Copy link

Hi!
I noticed all of the requests go directly to the proxy.
It would be great to have an option to skip requests to some hosts (usually these are local requests that do not need a proxy).

I appreciate any feedback on code/feature.

Thank you for this tool!

@alexsorokoletov
Copy link
Author

@oyyd would be great if you can take a look at this PR once you have a chance. Thank you!

@alexsorokoletov alexsorokoletov changed the title Feature: support for skipping requests to some hosts WIP Feature: support for skipping requests to some hosts Nov 16, 2019
allows skipping local requests or any other requests by hostname
@alexsorokoletov alexsorokoletov changed the title WIP Feature: support for skipping requests to some hosts Feature: support for skipping requests to some hosts Nov 16, 2019
target: { host: ph.hostname, port: ph.port },
});
} else {
logger.info('skipping this request because it is local');
Copy link
Owner

Choose a reason for hiding this comment

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

The skip has beed listed at the start so that I prefer we don't log again here.

@oyyd
Copy link
Owner

oyyd commented Nov 17, 2019

Great work! LGTM and leave a comment.

The new option skip has the default value of localhost|127.0.0.1 which should change the default behavior of the lib but I think it should be okay.

@alexsorokoletov
Copy link
Author

Good points, @Ooyd! I’ll address them 🤝

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