Skip to content

Commit

Permalink
Json Rpc should only handle application/json requests (#8057)
Browse files Browse the repository at this point in the history
  • Loading branch information
benaadams authored Jan 16, 2025
1 parent 5c39f42 commit b108189
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Nethermind/Nethermind.Runner/JsonRpc/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ public void Configure(IApplicationBuilder app, IWebHostEnvironment env, IJsonRpc
{
await ctx.Response.WriteAsync("Nethermind JSON RPC");
}
else
else if (ctx.Request.ContentType?.Contains("application/json") ?? false)
{
if (jsonRpcUrl.MaxRequestBodySize is not null)
ctx.Features.Get<IHttpMaxRequestBodySizeFeature>().MaxRequestBodySize = jsonRpcUrl.MaxRequestBodySize;
Expand Down

0 comments on commit b108189

Please sign in to comment.