-
Notifications
You must be signed in to change notification settings - Fork 27
Add setting to pass proxies to requests #212
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
Add setting to pass proxies to requests #212
Conversation
ben-beauhurst
commented
Sep 15, 2025
- Added a setting LINKCHECK_PROXIES so that proxies can be passed to the requests
- Added another setting LINKCHECK_TRUST_PROXY_SSL to give the option to turn off SSL verification
- Added a test
linkcheck/tests/test_linkcheck.py
Outdated
| 'linkcheck.models.PROXIES', | ||
| {'http': 'http://proxy.example.com:8080'}, | ||
| ) | ||
| @patch('requests.head') |
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.
Did you try using @requests_mock.Mocker(), as other tests in this file are using?
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.
I've updated it to use requests_mock like the other tests
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.
The new settings should be documented in the README.
…ng it in line with the other tests.
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.
Thanks, looks good!