sumanion/laravel-cloudflare

Simple way to determine real client IP and country when using CloudFlare

Installs: 3 146

Dependents: 0

Suggesters: 0

Security: 0

Stars: 9

Watchers: 1

Forks: 5

Type:laravel-package

1.0.0 2016-09-12 18:42 UTC

This package is not auto-updated.

Last update: 2020-10-30 22:15:08 UTC


README

This Laravel package helps to determine the IP address and current country of the client when using CloudFlare.

Installation

From the command line, run:

composer require sumanion/laravel-cloudflare

Available Methods

Note: When a website is using CloudFlare nameservers the $_SERVER['REMOTE_ADDR'] points to CloudFlare, and we have to do extra validation to get "the real" IP address of the client.

Note: CloudFlare usually sends a CF_IPCOUNTRY HTTP header with current country of the client.