Skip to content

Commit

Permalink
Update Configure.AppHost.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
mythz committed Mar 15, 2024
1 parent 2dcb0af commit c0dd377
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions MyApp/Configure.AppHost.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ public void Configure(IWebHostBuilder builder) => builder
context.Configuration.GetSection(nameof(AppConfig)).Bind(AppConfig.Instance);
services.AddSingleton(AppConfig.Instance);
var r2AccountId = Environment.GetEnvironmentVariable("R2_ACCOUNT_ID");
var r2AccessId = Environment.GetEnvironmentVariable("R2_ACCESS_KEY_ID");
var r2AccessKey = Environment.GetEnvironmentVariable("R2_SECRET_ACCESS_KEY");
var r2AccountId = context.Configuration.GetValue("R2AccountId", Environment.GetEnvironmentVariable("R2_ACCOUNT_ID"));
var r2AccessId = context.Configuration.GetValue("R2AccessKeyId", Environment.GetEnvironmentVariable("R2_ACCESS_KEY_ID"));
var r2AccessKey = context.Configuration.GetValue("R2SecretAccessKey", Environment.GetEnvironmentVariable("R2_SECRET_ACCESS_KEY"));
var s3Client = new AmazonS3Client(r2AccessId, r2AccessKey, new AmazonS3Config
{
ServiceURL = $"https://{r2AccountId}.r2.cloudflarestorage.com"
Expand Down

0 comments on commit c0dd377

Please sign in to comment.