|
25 | 25 | - [Action Monitoring](#action-monitoring) |
26 | 26 | - [Views](#action-monitoring-views) |
27 | 27 | - [Reverse Proxy Config](#action-monitoring-reverse-proxy-config) |
| 28 | + - [Action Monitoring Guest Mode](#action-monitoring-guest-mode) |
28 | 29 | - [Authentication Monitoring](#authentication-monitoring) |
29 | 30 | - [Views](#authentication-monitoring-views) |
30 | 31 | - [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: |
407 | 408 |
|
408 | 409 |  |
409 | 410 |
|
410 | | -<a name="authentication-monitoring"></a> |
411 | | -## Authentication Monitoring |
| 411 | +<a name="action-monitoring-reverse-proxy-config"></a> |
| 412 | +### Action Monitoring Reverse Proxy Config |
412 | 413 |
|
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`: |
415 | 415 |
|
416 | 416 | ```php |
417 | | -'authentication_monitoring' => [ |
| 417 | +'action_monitoring' => [ |
418 | 418 | ... |
419 | 419 |
|
420 | 420 | /* |
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. |
423 | 423 | */ |
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', |
426 | 431 | ], |
427 | 432 | ``` |
428 | 433 |
|
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 |
431 | 436 |
|
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. |
433 | 440 |
|
434 | 441 | ```php |
| 442 | +/* |
| 443 | + * Configuration settings for action monitoring. |
| 444 | + */ |
435 | 445 | 'action_monitoring' => [ |
436 | 446 | ... |
437 | 447 |
|
438 | 448 | /* |
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. |
441 | 450 | */ |
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 | + ... |
443 | 464 |
|
444 | 465 | /* |
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. |
447 | 468 | */ |
448 | | - 'real_ip_header' => 'X-Forwarded-For', |
| 469 | + 'on_login' => true, |
| 470 | + 'on_logout' => true, |
449 | 471 | ], |
450 | 472 | ``` |
451 | 473 |
|
| 474 | + |
452 | 475 | <a name="authentication-monitoring-views"></a> |
453 | 476 | ### Authentication Monitoring Views |
454 | 477 |
|
|
0 commit comments