diff --git a/FakeNTLMServer.csproj b/FakeNTLMServer.csproj
index 6e1eaf0..9e6c40c 100644
--- a/FakeNTLMServer.csproj
+++ b/FakeNTLMServer.csproj
@@ -4,6 +4,10 @@
net8.0
enable
enable
+ 1.0.0-beta
+ 1.0.0.0
+ 1.0.0.0
+ 1.0.0-beta
diff --git a/Program.cs b/Program.cs
index d22627e..ee8a152 100644
--- a/Program.cs
+++ b/Program.cs
@@ -7,8 +7,8 @@ var builder = WebApplication.CreateBuilder(args);
// Add services to the container.
builder.Services.AddControllers();
-builder.Services.AddAuthentication(NegotiateDefaults.AuthenticationScheme)
- .AddNegotiate();
+ builder.Services.AddAuthentication(NegotiateDefaults.AuthenticationScheme)
+ .AddNegotiate();
builder.Services.AddAuthorization();
// Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle
builder.Services.AddEndpointsApiExplorer();
@@ -52,7 +52,7 @@ builder.Services.AddSwaggerGen(options =>
var app = builder.Build();
// Configure the HTTP request pipeline.
-if (app.Environment.IsDevelopment())
+if (app.Environment.IsDevelopment() || app.Configuration.GetValue("EnableSwagger"))
{
app.UseSwagger();
app.UseSwaggerUI(options =>
diff --git a/appsettings.json b/appsettings.json
index fd414e6..8eca5de 100644
--- a/appsettings.json
+++ b/appsettings.json
@@ -10,5 +10,6 @@
"EndpointDefaults": {
"Protocols": "Http1"
}
- }
+ },
+ "EnableSwagger": true
}