Skip to content

Commit

Permalink
Enabled Request Decompression By Default (#3175)
Browse files Browse the repository at this point in the history
* Updated request decompression to be enabled by default

* Updated the default request decompression ratio limit to be 25×
  • Loading branch information
dimitribouniol committed Apr 21, 2024
1 parent 71dff4f commit 0fb4f1d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Sources/Vapor/HTTP/Server/HTTPServer.swift
Expand Up @@ -119,7 +119,7 @@ public final class HTTPServer: Server, Sendable {

/// Enables decompression with default configuration.
public static var enabled: Self {
.enabled(limit: .ratio(10))
.enabled(limit: .ratio(25))
}

/// Enables decompression with custom configuration.
Expand Down Expand Up @@ -168,7 +168,7 @@ public final class HTTPServer: Server, Sendable {
reuseAddress: Bool = true,
tcpNoDelay: Bool = true,
responseCompression: CompressionConfiguration = .disabled,
requestDecompression: DecompressionConfiguration = .disabled,
requestDecompression: DecompressionConfiguration = .enabled,
supportPipelining: Bool = true,
supportVersions: Set<HTTPVersionMajor>? = nil,
tlsConfiguration: TLSConfiguration? = nil,
Expand Down Expand Up @@ -200,7 +200,7 @@ public final class HTTPServer: Server, Sendable {
reuseAddress: Bool = true,
tcpNoDelay: Bool = true,
responseCompression: CompressionConfiguration = .disabled,
requestDecompression: DecompressionConfiguration = .disabled,
requestDecompression: DecompressionConfiguration = .enabled,
supportPipelining: Bool = true,
supportVersions: Set<HTTPVersionMajor>? = nil,
tlsConfiguration: TLSConfiguration? = nil,
Expand Down

0 comments on commit 0fb4f1d

Please sign in to comment.