adding config for arch linux and nginx

This commit is contained in:
2026-05-14 21:59:19 +10:00
parent c0bc89083d
commit 8228ff27b8
4 changed files with 30 additions and 23 deletions
+9 -8
View File
@@ -22,19 +22,20 @@ services.AddControllers();
// Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle
services.AddEndpointsApiExplorer();
services.AddSwaggerGen();
string skey = "Super Secret SIGN AND VERIFY JWT TOKENS";
var appSettingsSection = builder.Configuration.GetSection("AppSettings");
string skey = "";
if (appSettingsSection == null)
{
skey = builder.Configuration.GetValue<string>("AppSettings:SecretKey");
}
else
if (appSettingsSection != null)
{
services.Configure<AppSettings>(appSettingsSection);
var appSettings = appSettingsSection.Get<AppSettings>();
skey = appSettings.Secret;
if ( appSettings != null)
skey = appSettings.Secret;
else
{
skey = builder.Configuration.GetValue<string>("AppSettings:Secret");
}
}
var key = Encoding.ASCII.GetBytes(skey);
services.AddAuthentication(x =>