Skip to content

Commit

Permalink
fix: Sort accept header media types correctly. (#550)
Browse files Browse the repository at this point in the history
  • Loading branch information
bgrozev authored Nov 5, 2024
1 parent bdf9fc5 commit 77dc5a9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/kotlin/org/jitsi/jibri/api/http/HttpApi.kt
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,8 @@ class HttpApi(
logger.info("Enabling prometheus interface at :$port/metrics")
get("/metrics") {
val accepts =
parseHeaderValue(call.request.headers["Accept"]).sortedBy { it.quality }.map { it.value }
parseHeaderValue(call.request.headers["Accept"]).sortedByDescending { it.quality }
.map { it.value }
val (metrics, contentType) = JibriMetricsContainer.getMetrics(accepts)
call.respondText(metrics, contentType = ContentType.parse(contentType))
}
Expand Down

0 comments on commit 77dc5a9

Please sign in to comment.