Skip to content
Snippets Groups Projects
Security.php 2.02 KiB
Newer Older
  • Learn to ignore specific revisions
  • namespace Config;
    
    use CodeIgniter\Config\BaseConfig;
    
    class Security extends BaseConfig
    {
        /**
         * --------------------------------------------------------------------------
         * CSRF Token Name
         * --------------------------------------------------------------------------
         *
         * Token name for Cross Site Request Forgery protection cookie.
         */
    
        public string $tokenName = 'csrf_test_name';
    
    
        /**
         * --------------------------------------------------------------------------
         * CSRF Header Name
         * --------------------------------------------------------------------------
         *
         * Token name for Cross Site Request Forgery protection cookie.
         */
    
        public string $headerName = 'X-CSRF-TOKEN';
    
    
        /**
         * --------------------------------------------------------------------------
         * CSRF Cookie Name
         * --------------------------------------------------------------------------
         *
         * Cookie name for Cross Site Request Forgery protection cookie.
         */
    
        public string $cookieName = 'csrf_cookie_name';
    
    
        /**
         * --------------------------------------------------------------------------
         * CSRF Expires
         * --------------------------------------------------------------------------
         *
         * Expiration time for Cross Site Request Forgery protection cookie.
         *
         * Defaults to two hours (in seconds).
         */
    
    
        /**
         * --------------------------------------------------------------------------
         * CSRF Regenerate
         * --------------------------------------------------------------------------
         *
         * Regenerate CSRF Token on every request.
         */
    
    
        /**
         * --------------------------------------------------------------------------
         * CSRF Redirect
         * --------------------------------------------------------------------------
         *
         * Redirect to previous page with error on failure.
         */