From c0bae59d047d64fa681c75e4d598ec7bb0461d72 Mon Sep 17 00:00:00 2001 From: Milwad <98118400+milwad-dev@users.noreply.github.com> Date: Mon, 16 Dec 2024 16:54:57 +0330 Subject: [PATCH] Update README.md --- README.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/README.md b/README.md index f4680f3..95f5a4e 100644 --- a/README.md +++ b/README.md @@ -22,6 +22,7 @@ - [Ajax Requests](#ajax-requests) - [Action Monitoring](#action-monitoring) - [Views](#action-monitoring-views) + - [Reverse Proxy Config](#action-monitoring-reverse-proxy-config) - [Authentication Monitoring](#authentication-monitoring) - [Views](#authentication-monitoring-views) - [How to use in big projects](#how-to-use-in-big-projects) @@ -381,6 +382,21 @@ If you want to monitor users when logging in or logout of your application, you ], ``` + +### Action Monitoring Reverse Proxy Config + +If you are using Reverse Proxy (Nginx or Cloudflare), you can use config to get real ip from specifc header like `X-Real-IP` or `X-Forwarded-For`: + +```php +/** +* Determines if the application should use reverse proxy headers to fetch the real client IP +* If set to true, it will try to get the IP from the specified header (X-Real-IP or X-Forwarded-For) +* This is useful when using reverse proxies like Nginx or Cloudflare. + */ +'use_reverse_proxy_ip' => true, +'real_ip_header' => 'X-Forwarded-For', +``` + ### Authentication Monitoring Views