1
0
mirror of https://github.com/flarum/core.git synced 2025-07-21 08:41:17 +02:00

Move floodgate to middleware, add extender + integration tests (#2170)

This commit is contained in:
Alexander Skvortsov
2020-11-29 17:13:22 -05:00
committed by GitHub
parent 5450fcda00
commit ed9131b36c
14 changed files with 400 additions and 2 deletions

View File

@@ -38,7 +38,7 @@ class AuthenticateWithHeader implements Middleware
$actor = $key->user ?? $this->getUser($userId);
$request = $request->withAttribute('apiKey', $key);
$request = $request->withAttribute('bypassFloodgate', true);
$request = $request->withAttribute('bypassThrottling', true);
} elseif ($token = AccessToken::find($id)) {
$token->touch();