File tree Expand file tree Collapse file tree 1 file changed +15
-7
lines changed Expand file tree Collapse file tree 1 file changed +15
-7
lines changed Original file line number Diff line number Diff line change @@ -404,13 +404,21 @@ If you want to monitor users when logging in or logout of your application, you
404404If you are using Reverse Proxy (Nginx or Cloudflare), you can use config to get real IP from a specific header like ` X-Real-IP ` or ` X-Forwarded-For ` :
405405
406406``` php
407- /**
408- * Determines if the application should use reverse proxy headers to fetch the real client IP
409- * If set to true, it will try to get the IP from the specified header (X-Real-IP or X-Forwarded-For)
410- * This is useful when using reverse proxies like Nginx or Cloudflare.
411- */
412- 'use_reverse_proxy_ip' => true,
413- 'real_ip_header' => 'X-Forwarded-For',
407+ 'action_monitoring' => [
408+ ...
409+
410+ /*
411+ * If your application is behind a reverse proxy (e.g., Nginx or Cloudflare),
412+ * enable this setting to fetch the real client IP from the proxy headers.
413+ */
414+ 'use_reverse_proxy_ip' => false,
415+
416+ /*
417+ * The header used by reverse proxies to forward the real client IP.
418+ * Common values are 'X-Forwarded-For' or 'X-Real-IP'.
419+ */
420+ 'real_ip_header' => 'X-Forwarded-For',
421+ ],
414422```
415423
416424<a name =" authentication-monitoring-views " ></a >
You can’t perform that action at this time.
0 commit comments