-
-
Notifications
You must be signed in to change notification settings - Fork 0
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
6 changed files
with
171 additions
and
142 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,34 @@ | ||
<?php | ||
|
||
return [ | ||
'cookie' => 'csrf-token', | ||
'length' => 16, | ||
'lifetime' => 86400, | ||
/* | ||
|-------------------------------------------------------------------------- | ||
| CSRF Cookie Name | ||
|-------------------------------------------------------------------------- | ||
| Default: 'csrf-token' | ||
| | ||
| The name of the cookie to use for the CSRF authentication token. | ||
| | ||
| This can be whatever you want (as long as it’s not empty and different | ||
| from the other cookie names in your application). | ||
| | ||
| Use any US-ASCII characters, except control characters, spaces, or tabs. | ||
| It also must not contain a separator character like the following: | ||
| ( ) < > @ , ; : \ " / [ ] ? = { } | ||
*/ | ||
'cookie_name' => 'csrf-token', | ||
/* | ||
|-------------------------------------------------------------------------- | ||
| CSRF Cookie Lifetime | ||
|-------------------------------------------------------------------------- | ||
| Default: 31449600 (approximately 1 year, in seconds) | ||
| | ||
| The age of CSRF cookies, in seconds (minimal value: 0). | ||
| | ||
| The reason for setting a long-lived expiration time is to avoid | ||
| problems in the case of a user closing a browser or bookmarking a page | ||
| and then loading that page from a browser cache. | ||
| Without persistent cookies, the form submission would fail in this case. | ||
*/ | ||
'cookie_age' => 31449600, | ||
]; |
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
Oops, something went wrong.