chore(ci): update configuration
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
using Azure.Identity;
|
||||
using FastEndpoints;
|
||||
using FastEndpoints.Swagger;
|
||||
using Microsoft.AspNetCore.HttpOverrides;
|
||||
@@ -25,11 +24,10 @@ using Socialize.Api.Modules.Workspaces;
|
||||
|
||||
var builder = WebApplication.CreateBuilder(args);
|
||||
|
||||
if (!builder.Environment.IsDevelopment())
|
||||
string? vaultUri = Environment.GetEnvironmentVariable("VaultUri");
|
||||
if (!string.IsNullOrWhiteSpace(vaultUri))
|
||||
{
|
||||
var vaultUri = Environment.GetEnvironmentVariable("VaultUri") ?? throw new InvalidOperationException("Missing VaultUri configuration setting");
|
||||
|
||||
builder.Configuration.AddAzureKeyVault(new Uri(vaultUri), new DefaultAzureCredential());
|
||||
throw new InvalidOperationException("VaultUri configuration is not supported by this deployment. Move secrets to environment variables.");
|
||||
}
|
||||
|
||||
builder.Services.AddCors(options =>
|
||||
|
||||
Reference in New Issue
Block a user