定制 johnwilhite/laravel-flare-scrubber 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

johnwilhite/laravel-flare-scrubber

Composer 安装命令:

composer require johnwilhite/laravel-flare-scrubber

包简介

Request Data Scrubber for Laravel Flare Reporting

README 文档

README

https://flareapp.io/blog/18-how-to-censor-sensitive-information-in-requests-to-flare

Though this package will recursively search requests for keys, which may be an improvement depending on the usecase.

Request Data Scrubber for Laravel Flare Reporting

Flare doesn't seem to provide any documentation on scrubbing sensitive data from requests before sending over errors. This package is a simple service provider that allows a config to define what data should be sanitized.

Installation

composer require johnwilhite/laravel-flare-scrubber

Usage

If you don't already have one, create a config/flare.php file and define a sensitive_data array.

<?php

return [
    'sensitive_data' => [
        'keys' => [
            'ssn',
            'bank_routing_number',
            'credit_card_number'
        ],
        'key_regex' => [
            '/^ssn/'
        ],
        'value_regex' => [
            '/^\d{3}-?\d{2}-?\d{4}$/'
        ]
    ]
];

Before sending your data to flare, this provider will recursively search the request data and sanitize the values of any match. Key matches can apply to entire arrays as well. There are 3 options that can be used optionally and interchangeably:

  • keys An exact match to the key name.

  • key_regex A regex pattern to match a key.

  • value_regex A regex pattern to match a value.

Additionally, you may define the sanitized value text at flare.sensitive_data.sanitization_text. The default is ***SANITIZED***.

License

MIT

统计信息

  • 总下载量: 31.2k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 1
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2020-12-24

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固