Dieser Commit ist enthalten in:
Ursprung
d1dcdb27c1
Commit
8523edaa76
@ -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
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren