File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
src/main/kotlin/com/ashampoo/imageproxy Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -42,6 +42,8 @@ private val validQualityRange = 10..100
4242private const val DEFAULT_LONG_SIDE_PX = 480
4343private const val DEFAULT_QUALITY = 90
4444
45+ private const val MAX_LONG_SIDE_PX = 2048
46+
4547private const val DEFAULT_TARGET_FORMAT = " .jpg"
4648
4749private val httpClient = HttpClient ()
@@ -72,11 +74,11 @@ fun Application.configureRouting() {
7274
7375 val authToken = call.request.header(AUTHORIZATION_HEADER )
7476
75- if (longSidePx > 2000 ) {
77+ if (longSidePx > MAX_LONG_SIDE_PX ) {
7678
7779 call.respond(
7880 status = HttpStatusCode .BadRequest ,
79- message = " LongSidePx size must be lower than 2000px : $longSidePx "
81+ message = " LongSidePx size must be lower than $MAX_LONG_SIDE_PX pixels : $longSidePx "
8082 )
8183
8284 return @get
You can’t perform that action at this time.
0 commit comments