Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/vdlp/oc-csrf-plugin
Adds CSRF protection to October CMS frontend.
https://github.com/vdlp/oc-csrf-plugin
csrf october-cms october-plugin octobercms php security
Last synced: about 4 hours ago
JSON representation
Adds CSRF protection to October CMS frontend.
- Host: GitHub
- URL: https://github.com/vdlp/oc-csrf-plugin
- Owner: vdlp
- License: gpl-2.0
- Created: 2019-07-19T11:24:02.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2024-03-14T13:47:37.000Z (8 months ago)
- Last Synced: 2024-10-27T09:50:54.488Z (19 days ago)
- Topics: csrf, october-cms, october-plugin, octobercms, php, security
- Language: PHP
- Homepage:
- Size: 48.8 KB
- Stars: 5
- Watchers: 8
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Vdlp.Csrf
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 `` section:
```
```
Add the CSRF token to the AJAX requests:
```
$.ajaxSetup({
headers: {
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
}
});```
## Questions? Need help?
If you have any question about how to use this plugin, please don't hesitate to contact us at [email protected]. We're happy to help you.