<?php

namespace App\ Config;

use CodeIgniter\Config\BaseConfig;

class App extends BaseConfig
{
    /*
    |--------------------------------------------------------------------------
    | Base Site URL
    |--------------------------------------------------------------------------
    | URL ke root aplikasi Anda. Sesuaikan dengan domain/subdomain Anda.
    */
    public string $baseURL = 'https://backup.fmipaunsoed.id/';

    /*
    |--------------------------------------------------------------------------
    | Index File
    |--------------------------------------------------------------------------
    | Kosongkan agar URL tidak mengandung "index.php"
    */
    public string $indexPage = '';

    /*
    |--------------------------------------------------------------------------
    | URI Protocol
    |--------------------------------------------------------------------------
    */
    public string $uriProtocol = 'REQUEST_URI';

    /*
    |--------------------------------------------------------------------------
    | Default Locale
    |--------------------------------------------------------------------------
    */
    public string $defaultLocale = 'id';
    public bool $negotiateLocale = false;
    public array $supportedLocales = ['id', 'en'];

    /*
    |--------------------------------------------------------------------------
    | Application Timezone
    |--------------------------------------------------------------------------
    */
    public string $appTimezone = 'Asia/Jakarta';

    /*
    |--------------------------------------------------------------------------
    | Default Character Set
    |--------------------------------------------------------------------------
    */
    public string $charset = 'UTF-8';

    /*
    |--------------------------------------------------------------------------
    | Force Global Secure Requests (HTTPS)
    |--------------------------------------------------------------------------
    */
    public bool $forceGlobalSecureRequests = true;

    /*
    |--------------------------------------------------------------------------
    | Proxy IPs
    |--------------------------------------------------------------------------
    */
    public array $proxyIPs = [];

    /*
    |--------------------------------------------------------------------------
    | CSRF Protection
    |--------------------------------------------------------------------------
    */
    public string $CSRFTokenName    = 'csrf_token';
    public string $CSRFHeaderName   = 'X-CSRF-TOKEN';
    public string $CSRFCookieName   = 'csrf_cookie';
    public int    $CSRFExpire       = 7200;
    public bool   $CSRFRegenerate   = true;
    public array  $CSRFExcludeURIs  = [];
    public string $CSRFSameSite     = 'Lax';

    /*
    |--------------------------------------------------------------------------
    | Content Security Policy
    |--------------------------------------------------------------------------
    */
    public bool $CSPEnabled = false;

    /*
    |--------------------------------------------------------------------------
    | Cookie Defaults
    |--------------------------------------------------------------------------
    */
    public string $cookiePrefix   = '';
    public string $cookieDomain   = '';
    public string $cookiePath     = '/';
    public bool   $cookieSecure   = true;
    public bool   $cookieHTTPOnly = true;
    public string $cookieSameSite = 'Lax';

    /*
    |--------------------------------------------------------------------------
    | Reverse Proxy IPs
    |--------------------------------------------------------------------------
    */
    public string $reverseProxyIPs = '';
}
