<?php
// Copy this file to config.php (same folder) and fill in your cPanel /
// phpMyAdmin values. config.php is gitignored — never commit real
// credentials.

return [
    // cPanel MySQL databases are namespaced as cpaneluser_dbname /
    // cpaneluser_dbuser — use the exact values shown in
    // cPanel > MySQL Databases.
    'db' => [
        'host' => 'localhost',
        'name' => 'cpaneluser_avi',
        'user' => 'cpaneluser_avi',
        'pass' => 'REPLACE_ME',
    ],

    // Random long string used to sign admin login tokens. Generate one with:
    //   php -r "echo bin2hex(random_bytes(32));"
    'jwt_secret' => 'REPLACE_ME_WITH_A_LONG_RANDOM_STRING',

    // One-time key required by /setup/create_admin.php to create the first
    // admin user. Set your own value, use it once, then it no longer matters
    // (that script refuses to run again once an admin exists).
    'setup_key' => 'REPLACE_ME_TOO',

    // Origins allowed to call this API (your frontend's URL(s)).
    //
    // With the standard cPanel layout — frontend at aviasistente.com/nuevoavi
    // and this API at aviasistente.com/api — both are the SAME origin, so the
    // browser never does a CORS preflight and this list is not consulted. It
    // only matters for local development, or if you later move the API to a
    // subdomain (e.g. api.aviasistente.com), where it becomes required.
    'allowed_origins' => [
        'https://aviasistente.com',
        'http://localhost:5173',
    ],
];
