<?php

namespace Config;

use CodeIgniter\Config\BaseConfig;

class App extends BaseConfig
{

	public $baseURL = FC_NOW_HOST;

	public $indexPage = SELF;

	public $uriProtocol = 'REQUEST_URI';

	public $defaultLocale = 'en';

	public $negotiateLocale = false;

	public $supportedLocales = ['en'];

	public $appTimezone = 'PRC';

	public $charset = 'UTF-8';

	public $forceGlobalSecureRequests = false;


	public $sessionDriver            = 'CodeIgniter\Session\Handlers\FileHandler';
	public $sessionCookieName        = 'diyuncms';
	public $sessionExpiration        = 7200;
	public $sessionSavePath          = WRITEPATH . 'session';
	public $sessionMatchIP           = false;
	public $sessionTimeToUpdate      = 300;
	public $sessionRegenerateDestroy = false;


	public $cookiePrefix   = '';
	public $cookieDomain   = '';
	public $cookiePath     = '/';
	public $cookieSecure   = false;
	public $cookieHTTPOnly = false;
    public $cookieSameSite = 'Lax';


	public $proxyIPs = '';

	public $CSRFTokenName  = 'csrf_test_name';
	public $CSRFCookieName = 'csrf_cookie_name';
	public $CSRFHeaderName = 'X-CSRF-TOKEN';
	public $CSRFExpire     = 7200;
	public $CSRFRegenerate = true;
	public $CSRFRedirect   = true;
    public $CSRFSameSite = 'Lax';

	public $CSPEnabled = false;


	public $salt = SYS_KEY;

	//--------------------------------------------------------------------

    public function __construct()
    {
        parent::__construct();
        $this->sessionCookieName = 'xunruicms_'.md5(SYS_KEY);
    }
}
