Skip to content

Commit b046619

Browse files
committed
Update README.md
1 parent 630c594 commit b046619

File tree

1 file changed

+41
-18
lines changed

1 file changed

+41
-18
lines changed

README.md

Lines changed: 41 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
- [Action Monitoring](#action-monitoring)
2626
- [Views](#action-monitoring-views)
2727
- [Reverse Proxy Config](#action-monitoring-reverse-proxy-config)
28+
- [Action Monitoring Guest Mode](#action-monitoring-guest-mode)
2829
- [Authentication Monitoring](#authentication-monitoring)
2930
- [Views](#authentication-monitoring-views)
3031
- [How to use in big projects](#how-to-use-in-big-projects)
@@ -407,48 +408,70 @@ If you want to disable some actions like created, you can use the config file:
407408

408409
![Action Monitoring Preview](/art/actions-monitoring/preview.png "Action Monitoring")
409410

410-
<a name="authentication-monitoring"></a>
411-
## Authentication Monitoring
411+
<a name="action-monitoring-reverse-proxy-config"></a>
412+
### Action Monitoring Reverse Proxy Config
412413

413-
Have you ever thought about monitoring the entry and exit of users of your application? Now you can :) <br>
414-
If you want to monitor users when logging in or logout of your application, you need to migrate the migrations to the config file and change true for monitoring authentication.
414+
If 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`:
415415

416416
```php
417-
'authentication_monitoring' => [
417+
'action_monitoring' => [
418418
...
419419

420420
/*
421-
* Enable or disable monitoring of user login and logout events.
422-
* Set to true to track these actions, or false to disable.
421+
* If your application is behind a reverse proxy (e.g., Nginx or Cloudflare),
422+
* enable this setting to fetch the real client IP from the proxy headers.
423423
*/
424-
'on_login' => true,
425-
'on_logout' => true,
424+
'use_reverse_proxy_ip' => false,
425+
426+
/*
427+
* The header used by reverse proxies to forward the real client IP.
428+
* Common values are 'X-Forwarded-For' or 'X-Real-IP'.
429+
*/
430+
'real_ip_header' => 'X-Forwarded-For',
426431
],
427432
```
428433

429-
<a name="action-monitoring-reverse-proxy-config"></a>
430-
### Action Monitoring Reverse Proxy Config
434+
<a name="action-monitoring-guest-mode"></a>
435+
### Action Monitoring Guest Mode
431436

432-
If 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`:
437+
Determines whether to track and store `actions` for users who are not authenticated (guests).
438+
When set to `true`, the package will also monitor guest user activity.
439+
When set to `false`, only authenticated user visits will be recorded.
433440

434441
```php
442+
/*
443+
* Configuration settings for action monitoring.
444+
*/
435445
'action_monitoring' => [
436446
...
437447

438448
/*
439-
* If your application is behind a reverse proxy (e.g., Nginx or Cloudflare),
440-
* enable this setting to fetch the real client IP from the proxy headers.
449+
* Determines whether to store `actions` even when the user is not logged in.
441450
*/
442-
'use_reverse_proxy_ip' => false,
451+
'guest_mode' => true,
452+
],
453+
```
454+
455+
<a name="authentication-monitoring"></a>
456+
## Authentication Monitoring
457+
458+
Have you ever thought about monitoring the entry and exit of users of your application? Now you can :) <br>
459+
If you want to monitor users when logging in or logout of your application, you need to migrate the migrations to the config file and change true for monitoring authentication.
460+
461+
```php
462+
'authentication_monitoring' => [
463+
...
443464

444465
/*
445-
* The header used by reverse proxies to forward the real client IP.
446-
* Common values are 'X-Forwarded-For' or 'X-Real-IP'.
466+
* Enable or disable monitoring of user login and logout events.
467+
* Set to true to track these actions, or false to disable.
447468
*/
448-
'real_ip_header' => 'X-Forwarded-For',
469+
'on_login' => true,
470+
'on_logout' => true,
449471
],
450472
```
451473

474+
452475
<a name="authentication-monitoring-views"></a>
453476
### Authentication Monitoring Views
454477

0 commit comments

Comments
 (0)