Compare commits
2 Commits
a63bccf47d
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| b3c4d95c6a | |||
| 6a4817cbcd |
@@ -5,12 +5,12 @@
|
|||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
<PackageId>Leanetec.EConnect.Proxy</PackageId>
|
<PackageId>Leanetec.EConnect.Proxy</PackageId>
|
||||||
<Version>1.0.0</Version>
|
<Version>1.0.1</Version>
|
||||||
<Company>Digital Data GmbH</Company>
|
<Company>Digital Data GmbH</Company>
|
||||||
<Product>Leanetec.EConnect.Proxy</Product>
|
<Product>Leanetec.EConnect.Proxy</Product>
|
||||||
<Title>Leanetec.EConnect.Proxy</Title>
|
<Title>Leanetec.EConnect.Proxy</Title>
|
||||||
<AssemblyVersion>1.0.0</AssemblyVersion>
|
<AssemblyVersion>1.0.1</AssemblyVersion>
|
||||||
<FileVersion>1.0.0</FileVersion>
|
<FileVersion>1.0.1</FileVersion>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
@@ -32,8 +32,13 @@ try
|
|||||||
|
|
||||||
app.UseMiddleware<ExceptionHandlingMiddleware>();
|
app.UseMiddleware<ExceptionHandlingMiddleware>();
|
||||||
|
|
||||||
|
bool useSwagger = config.GetValue<bool>("UseSwagger");
|
||||||
|
if(useSwagger)
|
||||||
|
app.Services.GetRequiredService<ILogger<Program>>()
|
||||||
|
.LogWarning("Swagger UI is enabled. Using Swagger in a production environment may expose sensitive API information and pose security risks.");
|
||||||
|
|
||||||
// Configure the HTTP request pipeline.
|
// Configure the HTTP request pipeline.
|
||||||
if (app.Environment.IsDevelopment())
|
if (app.Environment.IsDevelopment() || useSwagger)
|
||||||
{
|
{
|
||||||
app.UseSwagger();
|
app.UseSwagger();
|
||||||
app.UseSwaggerUI();
|
app.UseSwaggerUI();
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
"Microsoft.AspNetCore": "Warning"
|
"Microsoft.AspNetCore": "Warning"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"UseSwagger": true,
|
||||||
"AllowedHosts": "*",
|
"AllowedHosts": "*",
|
||||||
"EConnect": {
|
"EConnect": {
|
||||||
"BaseAddress": "https://portal.demoportal01.leanetec.com",
|
"BaseAddress": "https://portal.demoportal01.leanetec.com",
|
||||||
|
|||||||
Reference in New Issue
Block a user