<?php
/**
 * Crawlie admin backend — configuration.
 *
 * Fill in your real MySQL credentials below, then import schema.sql into that
 * database before using anything under api/ or admin/.
 *
 * SECURITY: after editing this file, make sure it is NOT publicly readable as
 * plain text by your web server (PHP files are executed, not served as text,
 * on any normal Apache/Nginx+PHP setup — but if you ever move this file
 * somewhere that serves raw file contents, these credentials would leak).
 */

// ---- Database ------------------------------------------------------------
define('DB_HOST', '127.0.0.1');
define('DB_NAME', 'crawlie');
define('DB_USER', 'crawlie');
define('DB_PASS', 'change-me');
define('DB_CHARSET', 'utf8mb4');

// ---- CORS ------------------------------------------------------------------
// Restrict this to your actual site's origin once deployed (e.g.
// 'https://yourdomain.com') instead of '*', so only your own site's pages can
// call this API from a browser. '*' is fine to get started with.
define('ALLOWED_ORIGIN', '*');

// ---- Crawl limits ----------------------------------------------------------
// Hard ceilings so a single request can't run away on a very large or
// pathological site. Raise these if your host allows longer request runtimes
// and you need bigger sites covered in one call.
define('CRAWL_MAX_PAGES', 500);
define('CRAWL_CONCURRENCY', 12);
define('CRAWL_PER_REQUEST_TIMEOUT', 12); // seconds, per individual page fetch
define('CRAWL_TOTAL_TIME_BUDGET', 50);   // seconds, whole crawl gives up gracefully after this

// ---- Session lifetime --------------------------------------------------
define('SESSION_LIFETIME_HOURS', 12);
