- Issue created by @alexharries
- π·πΈSerbia vaish
Hello Alex,
I'm really glad to hear you are finding the module useful. Thanks for the patch. I still didn't have time to review it but this feature is something that I find useful addition to the module. Would you mind creating a merge request. It might be easier for me to review it that way.
Best,
Vaish - πΊπΈUnited States mgaskey
Re-rolling patch in #3 β¨ [Patch provided] Allow administrators to specify IP addresses and ranges which should never be rate limited Needs review for latest updates in beta2 release.
- Merge request !5add IP address allowlist capabilities for rate limiting β (Merged) created by mgaskey
- πΊπΈUnited States mgaskey
Hi Vaish
I've added an MR with Alex's changes, and my re-roll for the latest version.
-
vaish β
committed 32f56e64 on 3.x authored by
mgaskey β
Issue #3409793 by mgaskey, alexgreyhead, vaish: Allow administrators to...
-
vaish β
committed 32f56e64 on 3.x authored by
mgaskey β
- π·πΈSerbia vaish
Thanks everyone. Please note that merged version contains some important changes compared to the initial MR.
1. Allowlist setting has been changed to an array and renamed:
$settings['crawler_rate_limit.settings']['ip_address_allowlist'] = [];
2. Function
updateClientIpXForwardedFor()
has been removed. I believe that this functionality does not belong here. Figuring out real IP address should be handled for the whole Drupal install and not for a single module. Additionally, this particular implementation has been focused on Cloudflare and may or may not work with other proxies. Note that Symfony'sgetClientIp()
method can read the client IP address from the "X-Forwarded-For" header when trusted proxies were set via "setTrustedProxies()". Drupal exposes this as a setting in the settings.php file. See: - π·πΈSerbia vaish
Thanks for the patch, @roman.haluska. Note that your patch came in at the same time I made some changes and removed the function you patched from the final version. See my previous comment for more details.