flarum / issue-archive

0 stars 0 forks source link

New, fixed version of reverse proxy PR #174

Open askvortsov1 opened 3 years ago

askvortsov1 commented 3 years ago

Let's try to restore https://github.com/flarum/core/pull/2236/files. For the initial implementation, we can keep the Arr::get($request->getServerParams(), 'REMOTE_ADDR', '127.0.0.1'); implementation currently present in post / discussion code; we can add a more rigorous system in the future. We can also inject config into the middleware constructor directly, so no need for a singleton definition

This also centralizes IP processing, so that we don't need to retrieve it in 20 different places. It would also then become available to throttling middleware.