parent
9b4c12913f
commit
305cb68b3b
@ -0,0 +1,86 @@ |
|||||||
|
<?php
|
||||||
|
declare(strict_types=1); |
||||||
|
/* |
||||||
|
* This file is Auto-Generated, Do NOT Modify!!! Please Delete this file to update configuration! |
||||||
|
*/ |
||||||
|
|
||||||
|
/* Contents of : on_email.php */ |
||||||
|
|
||||||
|
\tts\configure::set('email', array( |
||||||
|
// 'host' => '', // SMTP Hosts - seperated by ; |
||||||
|
// 'username' => '', |
||||||
|
// 'password' => '', |
||||||
|
'send_emails' => false, // Enable emails |
||||||
|
'email_on_errors' => false, |
||||||
|
'admin_emails' => array('Bob'=>'bob@localost', 'Chris'=>'chris@localost'), // Email Admins on error |
||||||
|
)); |
||||||
|
/* Contents of : on_html.php */ |
||||||
|
|
||||||
|
\tts\configure::set('html', array( |
||||||
|
'author' => 'Robert Strutts', |
||||||
|
'title' => 'In Example Project...', |
||||||
|
'javascript' => array('js/error_handler.js'=>'tts', 'js/store.js'=>'tts'), //'js/analytics.js'=>'project' |
||||||
|
'robots' => 'noindex', |
||||||
|
'keywords' => '', |
||||||
|
'description' => '', |
||||||
|
)); |
||||||
|
/* Contents of : on_http_request.php */ |
||||||
|
|
||||||
|
\tts\configure::set('http_request', array( |
||||||
|
'use' => 'sockets', // curl or sockets |
||||||
|
)); |
||||||
|
|
||||||
|
/* Contents of : on_security.php */ |
||||||
|
|
||||||
|
\tts\configure::set('security', array( |
||||||
|
'show_dumps' => true, |
||||||
|
'key' => 'y8+HSfrO8wFknxND8SA2mQZBoYpPDeK+2FmIzdxFU9EmTsZ2rdo7GED0nt4DsKoHmbiBBIoNTMAfl+eEMv6qeA==', |
||||||
|
'main_salt' => 'e6fde23484881a29f7b6c6459456f3e1', |
||||||
|
'csrf_security_level' => 'high', // Stop Attacks at what cost?? |
||||||
|
'retries_allowed_before_throttling' => 3, // Reties attempts allowed for login, before it throttles it... |
||||||
|
'throttling_login_seconds' => 20, // Seconds to deny more login attempts |
||||||
|
'password_hash' => PASSWORD_BCRYPT, |
||||||
|
'password_hash_options' => ['cost' => 10], // Default=10. This is a good baseline cost, but you may want to consider increasing it depending on your hardware. |
||||||
|
)); |
||||||
|
|
||||||
|
/* Contents of : on_sessions.php */ |
||||||
|
|
||||||
|
\tts\configure::set('sessions', array( |
||||||
|
'engine' => 'php', // php, db |
||||||
|
'type' => 'none', // Session Type: files, database, or cache |
||||||
|
'session_variable' => 'ses_app_aaa_', // set session variable name for project |
||||||
|
'session_name' => 'aaa_sys_342_', // More secure then PHPSESSID |
||||||
|
'session_table' => false, // DB PHP Session Table name, false = USE FILES |
||||||
|
'session_security_level' => 'blaze', // Faster Reqests keep at: blaze |
||||||
|
'session_key' => '6cb0d56f2345917624f2c5473e4d32cd', |
||||||
|
)); |
||||||
|
/* Contents of : on_tts.php */ |
||||||
|
|
||||||
|
/** |
||||||
|
* @todo REMOVE or CHANGE [set_local_site_domains] to your |
||||||
|
* PRIVATE or non-public accessible site domain name. |
||||||
|
* |
||||||
|
* Make sure the web-server only servers it on a |
||||||
|
* loop-back or non-routable IP address range, |
||||||
|
* otherwise people will be able to see lots of |
||||||
|
* private DEBUG info. Also, make sure your HOST file has an |
||||||
|
* entry to your web server's IP IG: 127.0.0.1 tts.home.local |
||||||
|
* |
||||||
|
* When in Doubt, just make live false, below here!!! |
||||||
|
*/ |
||||||
|
\tts\site_helper::set_local_site_domains('tts.home.local'); |
||||||
|
// \bs_tts\site_helper::set_allowed_Private_IPs(['192.168.32.2', '192.168.32.3']); |
||||||
|
// \bs_tts\site_helper::set_allowed_Public_IPs('12.x.x.x'); |
||||||
|
|
||||||
|
\tts\configure::set('tts', array( |
||||||
|
'site_name' => 'Testing', |
||||||
|
'short_url' => true, |
||||||
|
'default_project' => 'home', |
||||||
|
'check_HTML_tags' => true, |
||||||
|
'live' => (\tts\site_helper::remote_not_allowed_force_live()), |
||||||
|
)); |
||||||
|
/* Contents of : on_view_mode.php */ |
||||||
|
|
||||||
|
\tts\configure::set('view_mode', array( |
||||||
|
'default_paths' => array('json', 'common', 'flexbox', 'default') |
||||||
|
)); |
||||||
@ -0,0 +1,57 @@ |
|||||||
|
<?php
|
||||||
|
declare(strict_types=1); |
||||||
|
/* |
||||||
|
* This file is Auto-Generated, Do NOT Modify!!! Please Delete this file to update configuration! |
||||||
|
*/ |
||||||
|
|
||||||
|
/* Contents of : on_html_filter.php */ |
||||||
|
|
||||||
|
|
||||||
|
\tts\registry::get('di')->register('html_filter', function() { |
||||||
|
return new \tts\html_filter(); |
||||||
|
}); |
||||||
|
/* Contents of : on_log.php */ |
||||||
|
|
||||||
|
|
||||||
|
\tts\registry::get('di')->register('log', function(array $arg) { |
||||||
|
$file_name = null; |
||||||
|
if (isset($arg[0]) && is_string($arg[0])) { |
||||||
|
$file_name = $arg[0]; // filename |
||||||
|
} |
||||||
|
|
||||||
|
if (isset($arg[1]) && is_int($arg[1])) { |
||||||
|
$count = $arg[1]; // max count |
||||||
|
return new \tts\log($file_name, $count); |
||||||
|
} |
||||||
|
|
||||||
|
if (! empty($file_name)) { |
||||||
|
return new \tts\log($file_name); |
||||||
|
} |
||||||
|
|
||||||
|
return new \tts\log(); |
||||||
|
}); |
||||||
|
/* Contents of : on_templates.php */ |
||||||
|
|
||||||
|
|
||||||
|
\tts\registry::get('di')->register('templates', function(array $arg) { |
||||||
|
$file_type = '.tpl'; |
||||||
|
if (isset($arg[0]) && is_string($arg[0])) { |
||||||
|
$file_type = $arg[0]; |
||||||
|
} |
||||||
|
return new \tts\liquid_templates($file_type); |
||||||
|
}); |
||||||
|
/* Contents of : on_test_db.php */ |
||||||
|
|
||||||
|
|
||||||
|
\tts\registry::get('di')->register('db_mocker', function($args) { |
||||||
|
try { |
||||||
|
$conn = new \PDO('sqlite::memory:'); |
||||||
|
// set the PDO error mode to exception |
||||||
|
$conn->setAttribute(\PDO::ATTR_ERRMODE, \PDO::ERRMODE_EXCEPTION); |
||||||
|
return $conn; |
||||||
|
} catch (\PDOException $e) { |
||||||
|
echo $e->getMessage(); |
||||||
|
} catch (\Exception $e) { |
||||||
|
echo $e->getMessage(); |
||||||
|
} |
||||||
|
}); |
||||||
Loading…
Reference in new issue