File tree Expand file tree Collapse file tree 3 files changed +1
-6
lines changed
src/NetCoreKit.Infrastructure/Features Expand file tree Collapse file tree 3 files changed +1
-6
lines changed Original file line number Diff line number Diff line change 1010 },
1111 "Features" : {
1212 "Mongo" : {
13- "Enabled" : true ,
1413 "ConnectionString" : " mongodb://127.0.0.1:27017" ,
1514 "Database" : " BiMonetaryApi"
1615 },
1716 "ApiVersion" : { "Enabled" : true },
1817 "OpenApi" : {
19- "Enabled" : true ,
2018 "OpenApiUI" : { "Enabled" : true },
2119 "ApiInfo" : {
2220 "Title" : " BiMonetary API" ,
2927 }
3028 },
3129 "AuthN" : {
32- "Enabled" : true ,
3330 "ClaimToScopeMap" : {
3431 "access_example1_api" : " example1_api_scope" ,
3532 "access_example2_api" : " example2_api_scope"
Original file line number Diff line number Diff line change 1010 },
1111 "Features" : {
1212 "EfCore" : {
13- "Enabled" : true ,
1413 //"SqlServerConnString": "Server=tcp:{0 },{1 };Database={2 };User Id={3 };Password={4};"
1514 "MySqlDb" : {
1615 "Database" : " maindb" ,
2322 "CleanArch" : { "Enabled" : true },
2423 "ApiVersion" : { "Enabled" : true },
2524 "OpenApi" : {
26- "Enabled" : true ,
2725 "OpenApiUI" : { "Enabled" : true },
2826 "Profiler" : { "Enabled" : true },
2927 "ApiInfo" : {
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ public Feature(IConfiguration config)
1313
1414 public bool IsEnabled ( string feature )
1515 {
16- var featureValue = _config . GetValue ( $ "Features:{ feature } :Enabled ", false ) ;
16+ var featureValue = _config . GetSection ( $ "Features:{ feature } " ) . Exists ( ) || _config . GetValue ( $ "Features: { feature } ", false ) ;
1717 return featureValue ;
1818 }
1919 }
You can’t perform that action at this time.
0 commit comments