-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
33 additions
and
113 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,35 +4,23 @@ Adds CSRF protection. | |
|
||
## Requirements | ||
|
||
* PHP 7.1 or higher | ||
* PHP 7.4 or higher | ||
|
||
## Installation | ||
|
||
*Composer:* | ||
|
||
``` | ||
composer require vdlp/oc-csrf-plugin | ||
``` | ||
|
||
*CLI:* | ||
|
||
``` | ||
php artisan plugin:install Vdlp.Csrf | ||
``` | ||
|
||
*October CMS:* | ||
|
||
Go to Settings > Updates & Plugins > Install plugins and search for 'CSRF'. | ||
|
||
## Configuration | ||
|
||
Add the plugin configuration to your projects' config folder: | ||
Add the plugin configuration to your config folder: | ||
|
||
``` | ||
php artisan vendor:publish --provider="Vdlp\Csrf\ServiceProviders\CsrfServiceProvider" --tag="config" | ||
php artisan vendor:publish --provider="Vdlp\Csrf\ServiceProvider" --tag="config" | ||
``` | ||
|
||
Add the CSRF token to the head: | ||
Add the CSRF token to the `<head>` section: | ||
|
||
``` | ||
<meta name="csrf-token" content="{{ csrf_token() }}"> | ||
|
@@ -52,4 +40,4 @@ $.ajaxSetup({ | |
|
||
## 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. You can also visit the support forum and drop your questions/issues there. | ||
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,7 +10,7 @@ | |
} | ||
], | ||
"require": { | ||
"php": "^7.1||^8.0", | ||
"php": "^7.4 || ^8.0", | ||
"composer/installers": "^1.0" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,7 +14,7 @@ | |
*/ | ||
|
||
'exclude_paths' => [ | ||
// i.e. '/path/to/exclude' | ||
// Example: '/path/to/exclude' | ||
], | ||
|
||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters