-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Making max payload size configurable (#1154)
- Loading branch information
Showing
7 changed files
with
46 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
server/server-app/src/main/kotlin/projektor/processing/ProcessingConfig.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package projektor.processing | ||
|
||
import io.ktor.server.config.* | ||
import projektor.parser.grouped.GroupedResultsParser | ||
|
||
data class ProcessingConfig(val maxPayloadSize: Int) { | ||
companion object { | ||
fun createProcessingConfig(applicationConfig: ApplicationConfig): ProcessingConfig { | ||
val maxPayloadSize: Int = applicationConfig.propertyOrNull("ktor.processing.maxPayloadSize")?.toString()?.toInt() ?: GroupedResultsParser.DEFAULT_MAX_PAYLOAD_SIZE | ||
|
||
return ProcessingConfig(maxPayloadSize) | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -70,4 +70,8 @@ ktor { | |
privateKey = ${?GITHUB_PRIVATE_KEY} | ||
} | ||
} | ||
|
||
processing { | ||
maxPayloadSize = ${?MAX_PAYLOAD_SIZE} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters