vdlp/oc-csrf-plugin
最新稳定版本:2.3.0
Composer 安装命令:
composer require vdlp/oc-csrf-plugin
包简介
Adds CSRF protection to October CMS frontend.
README 文档
README
Adds CSRF protection.
Requirements
- PHP 8.0.2 or higher
- October CMS 2.0 or higher
Installation
composer require vdlp/oc-csrf-plugin
Configuration
Add the plugin configuration to your config folder:
php artisan vendor:publish --provider="Vdlp\Csrf\ServiceProviders\CsrfServiceProvider" --tag="vdlp-csrf-config"
Add the CSRF token to the <head> section:
<meta name="csrf-token" content="{{ csrf_token() }}">
Add the CSRF token to the AJAX requests:
<script type="text/javascript">
$.ajaxSetup({
headers: {
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
}
});
</script>
Questions? Need help?
If you have any question about how to use this plugin, please don't hesitate to contact us at octobercms@vdlp.nl. We're happy to help you.
统计信息
- 总下载量: 38.82k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 5
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: GPL-2.0
- 更新时间: 2019-07-19