Fix Ratelimit
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful

Dieser Commit ist enthalten in:
Chaoscaot 2024-01-06 16:37:50 +01:00
Ursprung d1dcdb27c1
Commit 8523edaa76

Datei anzeigen

@ -47,10 +47,10 @@ fun Application.configurePlugins() {
global {
rateLimiter(limit = 60, refillPeriod = 60.seconds)
requestKey {
it.request.headers["X-Forwarded-Proto"] ?: it.request.local.remoteHost
it.request.headers["X-Forwarded-For"] ?: it.request.local.remoteHost
}
requestWeight { applicationCall, _ ->
if(applicationCall.request.headers["X-Forwarded-Proto"] != null) {
if(applicationCall.request.headers["X-Forwarded-For"] != null) {
0
} else {
1