Skip to content

Add setting to pass proxies to requests#212

Merged
claudep merged 7 commits into
DjangoAdminHackers:masterfrom
Beauhurst:upstream-pr-2-proxies
Sep 28, 2025
Merged

Add setting to pass proxies to requests#212
claudep merged 7 commits into
DjangoAdminHackers:masterfrom
Beauhurst:upstream-pr-2-proxies

Conversation

@ben-beauhurst
Copy link
Copy Markdown
Contributor

  • 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

Comment thread linkcheck/tests/test_linkcheck.py Outdated
'linkcheck.models.PROXIES',
{'http': 'http://proxy.example.com:8080'},
)
@patch('requests.head')
Copy link
Copy Markdown
Contributor

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?

Copy link
Copy Markdown
Contributor Author

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

Copy link
Copy Markdown
Contributor

@claudep claudep left a 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.

Copy link
Copy Markdown
Contributor

@claudep claudep left a comment

Choose a reason for hiding this comment

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

Thanks, looks good!

@claudep claudep merged commit 5c3218d into DjangoAdminHackers:master Sep 28, 2025
13 checks passed
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