diff --git a/src/MalwareSampleExchange.Console/Dockerfile b/src/MalwareSampleExchange.Console/Dockerfile
index 1f59edd..f1c2acb 100644
--- a/src/MalwareSampleExchange.Console/Dockerfile
+++ b/src/MalwareSampleExchange.Console/Dockerfile
@@ -4,8 +4,6 @@ WORKDIR /data
ENTRYPOINT dotnet /data/MalwareSampleExchange.Console.dll
-ENV ASPNETCORE_URLS="http://0.0.0.0:8080"
-
LABEL org.opencontainers.image.title="Malware Sample Exchange (MSE) Image" \
org.opencontainers.image.description="Malware Sample Exchange (MSE)" \
org.opencontainers.image.url="https://github.com/GDATASoftwareAG/mse" \
diff --git a/src/MalwareSampleExchange.Console/MalwareSampleExchange.Console.csproj b/src/MalwareSampleExchange.Console/MalwareSampleExchange.Console.csproj
index 78201ed..0a2f601 100644
--- a/src/MalwareSampleExchange.Console/MalwareSampleExchange.Console.csproj
+++ b/src/MalwareSampleExchange.Console/MalwareSampleExchange.Console.csproj
@@ -32,5 +32,9 @@
PreserveNewest
Always
+
+
+
+
diff --git a/src/MalwareSampleExchange.Console/Program.cs b/src/MalwareSampleExchange.Console/Program.cs
index 545e50f..f04d1cf 100644
--- a/src/MalwareSampleExchange.Console/Program.cs
+++ b/src/MalwareSampleExchange.Console/Program.cs
@@ -18,5 +18,6 @@ await Host.CreateDefaultBuilder(args)
{
builder.UseStartup();
builder.UseKestrel();
+ builder.UseUrls("http://0.0.0.0:8080");
})
.RunConsoleAsync();
diff --git a/src/MalwareSampleExchange.Console/PrometheusOptions.cs b/src/MalwareSampleExchange.Console/PrometheusOptions.cs
deleted file mode 100644
index af20004..0000000
--- a/src/MalwareSampleExchange.Console/PrometheusOptions.cs
+++ /dev/null
@@ -1,6 +0,0 @@
-namespace MalwareSampleExchange.Console;
-
-public class PrometheusOptions
-{
- public int Port { get; set; } = 9110;
-}
diff --git a/src/MalwareSampleExchange.Console/Properties/launchSettings.json b/src/MalwareSampleExchange.Console/Properties/launchSettings.json
deleted file mode 100644
index 21acfed..0000000
--- a/src/MalwareSampleExchange.Console/Properties/launchSettings.json
+++ /dev/null
@@ -1,28 +0,0 @@
-{
- "iisSettings": {
- "windowsAuthentication": false,
- "anonymousAuthentication": true,
- "iisExpress": {
- "applicationUrl": "http://localhost:50352/",
- "sslPort": 0
- }
- },
- "profiles": {
- "IIS Express": {
- "commandName": "IISExpress",
- "launchBrowser": true,
- "launchUrl": "swagger/",
- "environmentVariables": {
- "ASPNETCORE_ENVIRONMENT": "Development"
- }
- },
- "web": {
- "commandName": "Project",
- "launchBrowser": true,
- "launchUrl": "http://localhost:5000/swagger/",
- "environmentVariables": {
- "ASPNETCORE_ENVIRONMENT": "Development"
- }
- }
- }
-}
\ No newline at end of file
diff --git a/src/MalwareSampleExchange.Console/Startup.cs b/src/MalwareSampleExchange.Console/Startup.cs
index 7bba232..62ca68e 100644
--- a/src/MalwareSampleExchange.Console/Startup.cs
+++ b/src/MalwareSampleExchange.Console/Startup.cs
@@ -126,20 +126,15 @@ public void ConfigureServices(IServiceCollection services)
public void Configure(IApplicationBuilder app)
{
- app.UsePrometheusServer(q =>
- {
- var options = new PrometheusOptions();
- _configuration.GetSection("Prometheus").Bind(options);
- q.Port = options.Port;
- });
+ app.UsePrometheusServer();
app.UsePrometheusRequestDurations(q =>
{
q.IncludeMethod = true;
q.IncludePath = true;
- q.Buckets = new[] { 0.005, 0.01, 0.025, 0.05, 0.075, 0.1, 0.25, 0.5, 0.75, 1.0, 2.5, 5.0, 7.5, 10.0, 20.0, 30.0, 60.0 };
- q.IgnoreRoutesConcrete = new[] { "/metrics", "/favicon.ico", "/index.html", "/" };
- q.IgnoreRoutesStartWith = new[] { "/swagger" };
+ q.Buckets = [0.005, 0.01, 0.025, 0.05, 0.075, 0.1, 0.25, 0.5, 0.75, 1.0, 2.5, 5.0, 7.5, 10.0, 20.0, 30.0, 60.0];
+ q.IgnoreRoutesConcrete = ["/metrics", "/favicon.ico", "/index.html", "/"];
+ q.IgnoreRoutesStartWith = ["/swagger"];
});
app.UseDefaultFiles()