Skip to content

Latest commit

 

History

History
47 lines (32 loc) · 1.73 KB

CHANGELOG.md

File metadata and controls

47 lines (32 loc) · 1.73 KB

Changelog

All notable changes to Cloudflare Laravel Request will be documented in this file.

v1.0.2 - 2024-09-19

Bug fix: Agent was failing when the browser was not detectable

Full Changelog: https://github.com/pdphilip/cf-request/compare/v1.0.1...v1.0.2

v1.0.1 - 2024-09-18

  • Removed Middleware option

Full Changelog: https://github.com/pdphilip/cf-request/compare/v1.0.0...v1.0.1

v1.0.0 - 2024-09-18

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 Country
  • CfRequest::timezone() - Origin Timezone
  • CfRequest::city() - Origin City
  • CfRequest::region() - Origin Region
  • CfRequest::postalCode() - Origin Postal Code
  • CfRequest::lat() - Origin Latitude
  • CfRequest::lon() - Origin Longitude
  • fRequest::isBot() - If it's a bot
  • CfRequest::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 Brand
  • CfRequest::deviceModel() - Device Model
  • CfRequest::os() - Device OS
  • CfRequest::osVersion() - Device OS Version
  • CfRequest::browser() - Device Browser
  • CfRequest::browserVersion() - Device Browser Version

With this package, you can:

  • Replace Request $request with CfRequest $request in your controller methods to access the additional methods.
  • Call the CfRequest facade anywhere in your application to access this information.