Closed victorcpereira closed 8 years ago
@victorcpereira, really excited by this PR. I gave it a quick skim and left some feedback. I also noticed that the automated build failed on account of Drupal Code Sniffer errors.
See here: https://travis-ci.org/d8-contrib-modules/cloudflare/jobs/83010311
Let me know if you have time to address otherwise I should be able to over the weekend.
@aweingarten Sorry for delay. I have time to address tomorrow evening and the weekend.
@victorcpereira, No worries :) Want to be as supportive as possible so we can get your work merged!
This functionality has been incorporated into the module!
Drupal has got the function Drupal::request()->getClientIp(). I made a class that behaves like the hook_boot. This class is called in every request. I added Cloudflare IPs in a trusted proxies list. This way, Drupal Core can return the client ip instead of CloudFlare IP.