Compare commits
2 Commits
144dd6e742
...
ae8d84012b
Author | SHA1 | Date |
---|---|---|
|
ae8d84012b | |
|
ddb86eae51 |
|
@ -3,7 +3,7 @@
|
||||||
// Get any flash messages from previous request
|
// Get any flash messages from previous request
|
||||||
$flash_messages = Feedback::getFlash();
|
$flash_messages = Feedback::getFlash();
|
||||||
if (!empty($flash_messages)) {
|
if (!empty($flash_messages)) {
|
||||||
$messages = array_merge($messages, array_map(function($flash) {
|
$system_messages = array_merge($system_messages, array_map(function($flash) {
|
||||||
return [
|
return [
|
||||||
'category' => $flash['category'],
|
'category' => $flash['category'],
|
||||||
'key' => $flash['key'],
|
'key' => $flash['key'],
|
||||||
|
|
|
@ -11,7 +11,7 @@ require_once __DIR__ . '/../classes/ratelimiter.php';
|
||||||
* @return bool True if request is allowed, false if rate limited
|
* @return bool True if request is allowed, false if rate limited
|
||||||
*/
|
*/
|
||||||
function checkRateLimit($database, $endpoint, $userId = null) {
|
function checkRateLimit($database, $endpoint, $userId = null) {
|
||||||
$rateLimiter = new RateLimiter($database);
|
$rateLimiter = new RateLimiter($database['db']);
|
||||||
$ipAddress = $_SERVER['REMOTE_ADDR'];
|
$ipAddress = $_SERVER['REMOTE_ADDR'];
|
||||||
|
|
||||||
// Check if request is allowed
|
// Check if request is allowed
|
||||||
|
|
Loading…
Reference in New Issue