- How does this package improve Flare’s native request scrubbing?
- This package offers **recursive scrubbing** of nested request arrays/objects, matching sensitive data by exact keys, key regex patterns, or value regex—far beyond Flare’s built-in censoring. It’s ideal for deeply nested payloads or complex compliance rules.
- What Laravel versions does this package support?
- The package works with **Laravel 8+**, aligning with Flare’s latest requirements. Always verify your PHP version (8.0+) and Laravel version compatibility, as Flare’s native scrubbing may evolve.
- Can I customize the sanitization text (e.g., `[REDACTED]` instead of `***SANITIZED***`)?
- Yes, override the default `***SANITIZED***` by setting `flare.sensitive_data.sanitization_text` in your `config/flare.php`. This allows compliance with specific redaction standards.
- Will this package work if I’m not using Laravel Flare?
- No, this package **requires Laravel Flare** to be installed. If you’re using Sentry, Bugsnag, or another APM tool, this won’t integrate. Flare’s native scrubbing may suffice for simpler needs.
- How do I handle dynamic or obfuscated sensitive keys (e.g., `user_123_ssn`)?
- Use `key_regex` in your `config/flare.php` to match dynamic patterns like `/_ssn$/`. Exact key matching (`keys`) won’t work for variable prefixes/suffixes, so regex is critical for these cases.
- Does this package support nested objects (e.g., `stdClass` or custom objects) in request data?
- Yes, it **recursively traverses** arrays and objects, including `stdClass` instances. However, test edge cases like circular references or deeply nested structures, as performance may degrade with extreme complexity.
- Is there a performance impact when scrubbing large request payloads?
- The recursive scrubbing adds minimal overhead for typical use cases. For high-volume error reporting with **thousands of nested keys**, benchmark the impact—though most applications won’t notice a delay during failures.
- How do I test if sensitive data is being scrubbed correctly?
- Trigger an error with sensitive data in the request (e.g., `abort(500)` with an SSN), then check Flare’s reported payload. Verify matches (keys/values/regex) are replaced with your sanitization text. Use `dd($request->all())` to debug payload structure.
- What if Flare’s native scrubbing improves in the future? Will this package become obsolete?
- Flare’s native scrubbing may eventually replace this package. Monitor Flare’s blog (e.g., [this post](https://flareapp.io/blog/18-how-to-censor-sensitive-information-in-requests-to-flare)) for updates. Consider forking or maintaining locally if critical.
- Can I use this package alongside other Flare extensions or middleware?
- Yes, this package integrates as a **Laravel service provider** and won’t conflict with other Flare extensions. However, test interactions if using custom Flare hooks or middleware that also modifies request data.