Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
62ffe47d25 |
+2
-2
@@ -25,7 +25,7 @@ namespace YYApi
|
||||
public static IServiceCollection AddYYApi(this IServiceCollection builder, string title,
|
||||
string description = null)
|
||||
{
|
||||
return builder.AddYYAuth().AddYYDoc(title, description).AddCors(x => x.AddDefaultPolicy(po => po.AllowAnyHeader().AllowAnyMethod().AllowAnyOrigin()));
|
||||
return builder.AddYYAuth().AddYYDoc(title, description).AddCors();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -38,7 +38,7 @@ namespace YYApi
|
||||
public static IApplicationBuilder UseYYApi(this IApplicationBuilder builder, string title = "API文档",
|
||||
params SubmitMethod[] submitMethods)
|
||||
{
|
||||
return builder.UseYYException().UseYYDoc(title, submitMethods).UseMiddleware<YYAuthMiddleware>();
|
||||
return builder.UseYYException().UseYYDoc(title, submitMethods).UseMiddleware<YYAuthMiddleware>().UseCors(x => x.AllowAnyHeader().AllowAnyMethod().AllowAnyOrigin());
|
||||
}
|
||||
|
||||
|
||||
|
||||
+2
-2
@@ -25,8 +25,8 @@
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Swashbuckle.AspNetCore.Annotations" Version="5.0.0" />
|
||||
<PackageReference Include="Swashbuckle.AspNetCore.SwaggerUI" Version="5.0.0" />
|
||||
<PackageReference Include="HangFire.Core" Version="1.7.8" />
|
||||
<PackageReference Include="Hangfire.AspNetCore" Version="1.7.8" />
|
||||
<PackageReference Include="HangFire.Core" Version="1.7.9" />
|
||||
<PackageReference Include="Hangfire.AspNetCore" Version="1.7.9" />
|
||||
<PackageReference Include="Hangfire.Console" Version="1.4.2" />
|
||||
<PackageReference Include="Hangfire.Redis.StackExchange" Version="1.8.1" />
|
||||
</ItemGroup>
|
||||
|
||||
Reference in New Issue
Block a user