mirror of
https://github.com/FastTunnel/FastTunnel.git
synced 2025-02-08 10:59:31 +08:00
fix: compile error
This commit is contained in:
parent
632976f831
commit
749688820a
|
@ -23,6 +23,7 @@
|
|||
<PackageReference Include="Swashbuckle.AspNetCore.SwaggerGen" Version="6.5.0" />
|
||||
<PackageReference Include="Swashbuckle.AspNetCore.SwaggerUI" Version="6.5.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\FastTunnel.Core\FastTunnel.Core.csproj" />
|
||||
</ItemGroup>
|
||||
|
|
|
@ -48,7 +48,9 @@ public class Program
|
|||
builder.Services.AddControllers();
|
||||
// Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle
|
||||
builder.Services.AddEndpointsApiExplorer();
|
||||
#if DEBUG
|
||||
builder.Services.AddSwaggerGen();
|
||||
#endif
|
||||
builder.Services.AddCors(options =>
|
||||
{
|
||||
options.AddPolicy("corsPolicy", policy =>
|
||||
|
@ -109,8 +111,10 @@ public class Program
|
|||
// Configure the HTTP request pipeline.
|
||||
if (app.Environment.IsDevelopment())
|
||||
{
|
||||
#if DEBUG
|
||||
app.UseSwagger();
|
||||
app.UseSwaggerUI();
|
||||
#endif
|
||||
}
|
||||
|
||||
app.UseCors("corsPolicy");
|
||||
|
|
Loading…
Reference in New Issue
Block a user