1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-06 21:41:48 +02:00

s3: make scheme configurable

This enables using for http for S3 request for debugging or
implementations that don't have https configured.  This is not a problem
for binary caches since they should not contain sensitive information.
Both package signatures and AWS auth already protect against tampering.
This commit is contained in:
Daiderd Jordan 2018-12-07 23:38:24 +01:00
parent 05f0543a17
commit 898823b67d
No known key found for this signature in database
GPG key ID: D02435D05B810C96
3 changed files with 11 additions and 7 deletions

View file

@ -622,7 +622,7 @@ struct CurlDownloader : public Downloader
// FIXME: do this on a worker thread
try {
#ifdef ENABLE_S3
S3Helper s3Helper("", Aws::Region::US_EAST_1, ""); // FIXME: make configurable
S3Helper s3Helper("", Aws::Region::US_EAST_1, "", ""); // FIXME: make configurable
auto slash = request.uri.find('/', 5);
if (slash == std::string::npos)
throw nix::Error("bad S3 URI '%s'", request.uri);