upgrade:8.0.2
This commit is contained in:
parent
b86a01f1bf
commit
ba7201587c
@ -1,6 +1,6 @@
|
|||||||
<Project>
|
<Project>
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<!-- All Fake packages -->
|
<!-- All Fake packages -->
|
||||||
<FakePackageVersion>8.0.1</FakePackageVersion>
|
<FakePackageVersion>8.0.2</FakePackageVersion>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
</Project>
|
</Project>
|
||||||
|
|||||||
@ -64,30 +64,7 @@ public class InterfaceForwardApiModule : FakeModule
|
|||||||
options.SerializerSettings.Converters.Add(new LongJsonConverter());
|
options.SerializerSettings.Converters.Add(new LongJsonConverter());
|
||||||
});
|
});
|
||||||
|
|
||||||
services.AddFakeSwaggerGen(options =>
|
services.AddFakeSwaggerGen(addSecurity: true)
|
||||||
{
|
|
||||||
options.AddSecurityDefinition("Bearer", new OpenApiSecurityScheme()
|
|
||||||
{
|
|
||||||
Description = "JWT授权数据将在请求头中进行传输,在下方输入Bearer {token} 即可,注意两者之间有空格",
|
|
||||||
Name = "Authorization",
|
|
||||||
In = ParameterLocation.Header,
|
|
||||||
Type = SecuritySchemeType.ApiKey
|
|
||||||
});
|
|
||||||
options.AddSecurityRequirement(new OpenApiSecurityRequirement
|
|
||||||
{
|
|
||||||
{
|
|
||||||
new OpenApiSecurityScheme
|
|
||||||
{
|
|
||||||
Reference = new OpenApiReference()
|
|
||||||
{
|
|
||||||
Id = "Bearer",
|
|
||||||
Type = ReferenceType.SecurityScheme
|
|
||||||
}
|
|
||||||
},
|
|
||||||
[]
|
|
||||||
}
|
|
||||||
});
|
|
||||||
})
|
|
||||||
.AddFakeAspNetCoreAuditing();
|
.AddFakeAspNetCoreAuditing();
|
||||||
|
|
||||||
services.AddCors(options =>
|
services.AddCors(options =>
|
||||||
@ -131,6 +108,9 @@ public class InterfaceForwardApiModule : FakeModule
|
|||||||
// Add Aspire default endpoints.
|
// Add Aspire default endpoints.
|
||||||
app.MapDefaultEndpoints();
|
app.MapDefaultEndpoints();
|
||||||
|
|
||||||
|
// 虚拟路由-网关适配
|
||||||
|
app.UsePathBase(app.Configuration["ASPNETCORE_PATHBASE"]);
|
||||||
|
|
||||||
// Configure the HTTP request pipeline.
|
// Configure the HTTP request pipeline.
|
||||||
app.UseFakeSwagger();
|
app.UseFakeSwagger();
|
||||||
|
|
||||||
|
|||||||
@ -4,6 +4,7 @@ using Serilog;
|
|||||||
var builder = WebApplication.CreateSlimBuilder(args);
|
var builder = WebApplication.CreateSlimBuilder(args);
|
||||||
var configuration = builder.Configuration;
|
var configuration = builder.Configuration;
|
||||||
builder.Configuration.AddConsul("idwms/itfxapi", source => source.ReloadOnChange = true);
|
builder.Configuration.AddConsul("idwms/itfxapi", source => source.ReloadOnChange = true);
|
||||||
|
builder.Configuration.AddConsul("idwms/common");
|
||||||
Log.Logger = new LoggerConfiguration()
|
Log.Logger = new LoggerConfiguration()
|
||||||
.ReadFrom.Configuration(configuration)
|
.ReadFrom.Configuration(configuration)
|
||||||
.CreateLogger();
|
.CreateLogger();
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user