adding config for arch linux and nginx
This commit is contained in:
@@ -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 =>
|
||||
|
||||
Reference in New Issue
Block a user