1
0
mirror of https://github.com/flarum/core.git synced 2025-10-12 07:24:27 +02:00

Revert "Fixes wrong IP address when using a reverse proxy (#2236)" (#2242)

This reverts commit 451a557532 pending further discussion of https://github.com/flarum/core/pull/2236#issuecomment-663645583
This commit is contained in:
Alexander Skvortsov
2020-07-24 14:19:10 -04:00
committed by GitHub
parent 264ff67304
commit 2431df5602
7 changed files with 2 additions and 128 deletions

View File

@@ -62,7 +62,7 @@ class CreateDiscussionController extends AbstractCreateController
protected function data(ServerRequestInterface $request, Document $document)
{
$actor = $request->getAttribute('actor');
$ipAddress = $request->getAttribute('ipAddress');
$ipAddress = Arr::get($request->getServerParams(), 'REMOTE_ADDR', '127.0.0.1');
if (! $request->getAttribute('bypassFloodgate')) {
$this->floodgate->assertNotFlooding($actor);