https://github.com/ianmurrays/codeigniter-csrf-lib
Automagic CodeIgniter CSRF Protection Library
https://github.com/ianmurrays/codeigniter-csrf-lib
Last synced: 11 days ago
JSON representation
Automagic CodeIgniter CSRF Protection Library
- Host: GitHub
- URL: https://github.com/ianmurrays/codeigniter-csrf-lib
- Owner: ianmurrays
- License: mit
- Created: 2011-01-12T15:34:53.000Z (over 14 years ago)
- Default Branch: master
- Last Pushed: 2016-05-28T00:44:39.000Z (almost 9 years ago)
- Last Synced: 2025-04-02T09:44:57.023Z (about 2 months ago)
- Language: PHP
- Homepage:
- Size: 3.91 KB
- Stars: 22
- Watchers: 3
- Forks: 12
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# CodeIgniter CSRF Library
This library automatically protects all your forms against Cross-Site Request Forgery attacks, more
commonly refered to as CSRF.Just put the `application/hooks/csrf.php` in your hooks folder, and the `application/config/hooks.php`
file in your hooks.php config file (or add the content in case you're already using a hook), and you're done!The only caveat is that ajax POST requests will get rejected once the library is
installed. To fix this you need to include the CSRF token in your requests. This
token is injected into the `` of your files automatically, so all you need
to do is get it using any javascript framework and include it in the request. Check
the two lines just befor the ending your `` (``) to figure it out.## License
License is the MIT license. This project belongs to [linkigniter](https://github.com/linkworks/linkigniter).