Skip to content

Commit 4a6c9e5

Browse files
committed
missed network size limit
1 parent 107a7ad commit 4a6c9e5

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/Core/Settings.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ public string GetExternalUrl()
234234
[ConfigComment("How many entries in an X-Forwarded-For header to trust.\nDefaults to 3.\nSet to 0 to not trust any forwarded-for.")]
235235
public int MaxXForwardedFor = 3;
236236

237-
[ConfigComment("Maximum megabytes that can be sent as a single message from a client to the Swarm server.\nSet this lower to limit above, set this higher to allow very large file uploads.")]
237+
[ConfigComment("Maximum megabytes that can be sent as a single message from a client to the Swarm server.\nSet this lower to limit above, set this higher to allow very large file uploads.\nServer needs a restart for this to fully apply.")]
238238
public int MaxNetworkRequestMegabytes = 200;
239239

240240
/// <summary>Converts <see cref="MaxNetworkRequestMegabytes"/> to bytes as a long.</summary>

src/Core/WebServer.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ public void Prep()
139139
{
140140
options.Limits.MaxRequestHeadersTotalSize = 1024 * 1024;
141141
options.Limits.MaxRequestHeaderCount = 200;
142-
options.Limits.MaxRequestBodySize = 1024 * 1024 * 1024;
142+
options.Limits.MaxRequestBodySize = Program.ServerSettings.Network.MaxReceiveBytes;
143143
});
144144
timer.Check("[Web] WebApp builder prep");
145145
builder.Services.AddRazorPages();

0 commit comments

Comments
 (0)