devdavido/laravel-reporto
Composer 安装命令:
composer require devdavido/laravel-reporto
包简介
Log browser errors to the server using W3C Reporting API
关键字:
README 文档
README
This package makes use of the W3C Reporting API and provides an easy plug-and-play package for your existing project. It will automatically add the necessary Report HTTP headers and log all configured browser errors to your Laravel backend.
Documentation
Find yourself stuck using the package? Found a bug? Do you have general questions or suggestions for improving this package? Feel free to create an issue on GitHub, we'll try to address it as soon as possible.
If you've found a bug regarding security please mail github{at}diskoboss{døt}de instead of using the issue tracker.
Minimum requirements
- PHP 8.0+
- Laravel 9+
For support of older PHP / Laravel versions, check out previous releases of this package.
Installation
You can install this package via composer using this command:
composer require devdavido/laravel-reporto
The package will automatically register itself and add a Report-To header to your web routes.
Each error or violation will be logged to the backend.
You can publish the config-file with:
php artisan vendor:publish --provider="DevDavido\Reporto\ReportoServiceProvider" --tag="config"
This is the contents of the published config file:
return [ /* * Use this setting to enable the reporting API header */ 'enabled' => env('REPORTING_API_ENABLED', true), /* * Enables the reporting API for all subdomains */ 'include_subdomains' => env('REPORTING_API_INCLUDE_SUBDOMAINS', false), /* * Exclude certain source files from being logged */ 'exclude_source_files' => env('REPORTING_API_EXCLUDE_SOURCE_FILES', ['chrome-extension://*']), /* * Defines cached lifetime of all endpoint in seconds (86400s = 1 day) */ 'endpoint_max_age' => env('REPORTING_API_MAX_AGE', 86400), /* * Which types of browser errors to report * @see https://w3c.github.io/reporting/ */ 'groups' => [ 'default', 'csp-endpoint', 'network-errors' ], /* * If you want to set the logging route prefix */ 'route_prefix' => 'log' ];
Support me
If you installed the package and it was useful for you or your business, please don't hesitate to make a donation. Thank you!
Testing
You can run the tests with:
vendor/bin/phpunit
Ideas / ToDo
- Daily/weekly reports via email
- Multiple endpoints
- More unit tests
Changelog
Please see CHANGELOG for more information what has changed recently.
Security
If you discover any security related issues, please email github{at}diskoboss{døt}de instead of using the issue tracker.
Credits
- Freek Van der Herten for letting me use his packages as boilerplate.
License
The MIT License (MIT). Please see License File for more information.
devdavido/laravel-reporto 适用场景与选型建议
devdavido/laravel-reporto 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 730 次下载、GitHub Stars 达 11, 最近一次更新时间为 2018 年 09 月 08 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「browser」 「laravel」 「frontend」 「csp」 「feature-policy」 「report-api」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 devdavido/laravel-reporto 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 devdavido/laravel-reporto 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 devdavido/laravel-reporto 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Give your JS App some Backbone with Models, Views, Collections, and Events.
Instrument headless chrome/chromium instances from php5.6
Selenium4 (WebDriver) driver for Mink framework
Query filtering in your frontend
Article CSS-ID Frontend Output Optimization
Frontend support for the MultiColumnWizard
统计信息
- 总下载量: 730
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 11
- 点击次数: 7
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2018-09-08