Releases: pdphilip/cf-request
Releases · pdphilip/cf-request
v1.0.2
v1.0.1
- Removed Middleware option
Full Changelog: v1.0.0...v1.0.1
v1.0.0
Initial Release
Cloudflare Laravel Request inherits the request object from Laravel and parses specific headers from Cloudflare to provide additional information about the request, including:
CfRequest::ip()
- Original Client IP (Before it passes through any proxies)CfRequest::country()
- Origin CountryCfRequest::timezone()
- Origin TimezoneCfRequest::city()
- Origin CityCfRequest::region()
- Origin RegionCfRequest::postalCode()
- Origin Postal CodeCfRequest::lat()
- Origin LatitudeCfRequest::lon()
- Origin LongitudefRequest::isBot()
- If it's a botCfRequest::threatScore()
- Threat Score from Cloudflare
The User-Agent is also parsed to provide additional information about the device, including:
CfRequest::deviceType()
- Device Type (mobile, tablet, desktop, tv, etc)CfRequest::deviceBrand()
- Device BrandCfRequest::deviceModel()
- Device ModelCfRequest::os()
- Device OSCfRequest::osVersion()
- Device OS VersionCfRequest::browser()
- Device BrowserCfRequest::browserVersion()
- Device Browser Version
With this package, you can:
- Replace
Request $request
withCfRequest $request
in your controller methods to access the additional methods. - Call the
CfRequest
facade anywhere in your application to access this information.