Format code

This commit is contained in:
2026-05-16 23:08:09 +02:00
parent 81dd8045f2
commit d110df924e
562 changed files with 11025 additions and 10059 deletions
@@ -52,7 +52,8 @@ fun Application.configurePlugins() {
global {
rateLimiter(limit = 60, refillPeriod = 60.seconds)
requestKey {
it.request.headers["X-Forwarded-For"] ?: it.request.local.remoteHost
it.request.headers["X-Forwarded-For"]
?: it.request.local.remoteHost
}
requestWeight { applicationCall, _ ->
if (!applicationCall.request.headers.contains("X-Forwarded-For")) {
@@ -100,10 +101,12 @@ fun Application.configurePlugins() {
cookie.maxAgeInSeconds = 60 * 60 * 24 * 7
cookie.httpOnly = true
cookie.secure = true
transform(SessionTransportTransformerEncrypt(
config.sessionEncryptSecret.toByteArray(),
config.sessionSignSecret.toByteArray()
))
transform(
SessionTransportTransformerEncrypt(
config.sessionEncryptSecret.toByteArray(),
config.sessionSignSecret.toByteArray()
)
)
}
}
install(ContentNegotiation) {