Skip to content

Commit

Permalink
Add basic Proxy support. (#346)
Browse files Browse the repository at this point in the history
  • Loading branch information
felixfontein authored Oct 9, 2024
1 parent 9100c30 commit 6c67794
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
5 changes: 5 additions & 0 deletions changelogs/fragments/346-proxy-env.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
minor_changes:
- "Use Proxy configuration settings from the environment. Check out the
`aiohttp documentation on Proxy support <https://docs.aiohttp.org/en/stable/client_advanced.html#proxy-support>`__
for information on which environment variables are supported
(https://github.com/ansible/ansible-documentation/issues/1936, https://github.com/ansible-community/antsibull-docs/pull/346)."
2 changes: 1 addition & 1 deletion src/antsibull_docs/cli/doc_commands/collection.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ async def retrieve(
requestors = {}

lib_ctx = app_context.lib_ctx.get()
async with aiohttp.ClientSession() as aio_session:
async with aiohttp.ClientSession(trust_env=True) as aio_session:
context = await GalaxyContext.create(aio_session, galaxy_server=galaxy_server)
async with asyncio_pool.AioPool(size=lib_ctx.thread_max) as pool:
downloader = CollectionDownloader(
Expand Down
2 changes: 1 addition & 1 deletion src/antsibull_docs/cli/doc_commands/devel.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ async def retrieve(
requestors = {}

lib_ctx = app_context.lib_ctx.get()
async with aiohttp.ClientSession() as aio_session:
async with aiohttp.ClientSession(trust_env=True) as aio_session:
context = await GalaxyContext.create(aio_session, galaxy_server=galaxy_server)
async with asyncio_pool.AioPool(size=lib_ctx.thread_max) as pool:
if not use_installed_ansible_core:
Expand Down
2 changes: 1 addition & 1 deletion src/antsibull_docs/cli/doc_commands/stable.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ async def retrieve(
requestors = {}

lib_ctx = app_context.lib_ctx.get()
async with aiohttp.ClientSession() as aio_session:
async with aiohttp.ClientSession(trust_env=True) as aio_session:
context = await GalaxyContext.create(aio_session, galaxy_server=galaxy_server)
async with asyncio_pool.AioPool(size=lib_ctx.thread_max) as pool:
if not use_installed_ansible_core:
Expand Down

0 comments on commit 6c67794

Please sign in to comment.