Skip to content

Commit 1c72d7e

Browse files
borisahrensBoris Ahrens
andauthored
Update web server (#306)
* Set max iasyncenumerable buffer limit * Remove format job --------- Co-authored-by: Boris Ahrens <boris.ahrens@gdata.de>
1 parent 13d5ab8 commit 1c72d7e

File tree

4 files changed

+6
-14
lines changed

4 files changed

+6
-14
lines changed

.github/workflows/dotnet.yaml

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,6 @@ on:
1010
- '[0-9]+.[0-9]+.[0-9]+*'
1111

1212
jobs:
13-
format:
14-
runs-on: ubuntu-latest
15-
steps:
16-
- uses: actions/checkout@v2
17-
- name: Setup .NET
18-
uses: actions/setup-dotnet@v1
19-
with:
20-
dotnet-version: "8.0"
21-
- name: check format
22-
run: dotnet format --severity error --verify-no-changes ./MalwareSampleExchange.sln
23-
2413
build:
2514
runs-on: ubuntu-latest
2615
steps:

src/MalwareSampleExchange.Console/Controllers/SampleApiController.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
using Microsoft.Extensions.Options;
1515
using MalwareSampleExchange.Console.Attributes;
1616
using MalwareSampleExchange.Console.Models;
17-
using Microsoft.IdentityModel.Tokens;
1817
using MalwareSampleExchange.Console.ListRequester;
1918
using MalwareSampleExchange.Console.SampleStorage;
2019
using Prometheus.Client;

src/MalwareSampleExchange.Console/Controllers/TokensApiController.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ public Task<IActionResult> ListTokens([FromQuery][Required] DateTime start, [Fro
7777

7878
var tokens = _listRequester
7979
.RequestList(username, start, end, token)
80-
.CountAndCallAsync(count => _listRequestHistogram.WithLabels(username).Set(count)); ;
80+
.CountAndCallAsync(count => _listRequestHistogram.WithLabels(username).Set(count));
8181
return Task.FromResult<IActionResult>(Ok(tokens));
8282
}
8383
catch (Exception e)

src/MalwareSampleExchange.Console/Startup.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,11 @@ public void ConfigureServices(IServiceCollection services)
7575
services.Configure<UploadOptions>(_configuration.GetSection("Upload"));
7676

7777
services
78-
.AddMvc(options => options.EnableEndpointRouting = false)
78+
.AddMvc(options =>
79+
{
80+
options.EnableEndpointRouting = false;
81+
options.MaxIAsyncEnumerableBufferLimit = int.MaxValue;
82+
})
7983
.AddNewtonsoftJson(opts =>
8084
{
8185
opts.SerializerSettings.ContractResolver = new CamelCasePropertyNamesContractResolver();

0 commit comments

Comments
 (0)