fix: use http proxy for s3 access

I don't know why the AWS sdk disabled it by default. It would be nice
to have test coverage of the s3 store or proxies, but neither currently
exist.

Fixes: lix-project/lix#433
Change-Id: If1e76169a3d66dbec2e926af0d0d0eccf983b97b
This commit is contained in:
jade 2024-08-18 14:55:17 -07:00
parent 9845637359
commit 9aacf425dc
2 changed files with 12 additions and 0 deletions

View file

@ -0,0 +1,10 @@
---
synopsis: HTTP proxy environment variables are now respected for S3 binary cache stores
issues: [fj#433]
cls: [1788]
category: Fixes
credits: jade
---
Due to "legacy reasons" (according to the AWS C++ SDK docs), the AWS SDK ignores system proxy configuration by default.
We turned it back on.

View file

@ -140,6 +140,8 @@ ref<Aws::Client::ClientConfiguration> S3Helper::makeConfig(
res->connectTimeoutMs = 5 * 1000;
res->retryStrategy = std::make_shared<RetryStrategy>();
res->caFile = settings.caFile;
// Use the system proxy env-vars in curl for s3, which is off by default for some reason
res->allowSystemProxy = true;
return res;
}