parent
6cbb070429
commit
9b4c12913f
@ -1,72 +0,0 @@ |
|||||||
<?php
|
|
||||||
/* |
|
||||||
* This file is Auto-Generated, Do NOT Modify!!! Please Delete this file to update configuration! |
|
||||||
*/ |
|
||||||
|
|
||||||
/* Contents of : on_email.php */ |
|
||||||
|
|
||||||
\main_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 */ |
|
||||||
|
|
||||||
\main_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 */ |
|
||||||
|
|
||||||
\main_tts\configure::set('http_request', array( |
|
||||||
'use' => 'sockets', // curl or sockets |
|
||||||
)); |
|
||||||
|
|
||||||
/* Contents of : on_security.php */ |
|
||||||
|
|
||||||
\main_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 */ |
|
||||||
|
|
||||||
\main_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 */ |
|
||||||
|
|
||||||
\main_tts\configure::set_key('important', 'private_ip_as_local', false); |
|
||||||
|
|
||||||
\main_tts\configure::set('tts', array( |
|
||||||
'site_name' => 'Testing', |
|
||||||
'short_url' => true, |
|
||||||
'default_project' => 'home', |
|
||||||
'check_HTML_tags' => true, |
|
||||||
'live' => false, //(! \tts\security::is_localhost() ) // Is this Production?? |
|
||||||
)); |
|
||||||
|
|
||||||
/* Contents of : on_view_mode.php */ |
|
||||||
|
|
||||||
\main_tts\configure::set('view_mode', array( |
|
||||||
'default_paths' => array('json', 'common', 'flexbox', 'default') |
|
||||||
)); |
|
||||||
@ -1,5 +1,5 @@ |
|||||||
<?php |
<?php |
||||||
|
|
||||||
\main_tts\configure::set('http_request', array( |
\tts\configure::set('http_request', array( |
||||||
'use' => 'sockets', // curl or sockets |
'use' => 'sockets', // curl or sockets |
||||||
)); |
)); |
||||||
|
|||||||
@ -1,11 +1,25 @@ |
|||||||
<?php |
<?php |
||||||
|
|
||||||
\main_tts\configure::set_key('important', 'private_ip_as_local', false); |
/** |
||||||
|
* @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'); |
||||||
|
|
||||||
\main_tts\configure::set('tts', array( |
\tts\configure::set('tts', array( |
||||||
'site_name' => 'Testing', |
'site_name' => 'Testing', |
||||||
'short_url' => true, |
'short_url' => true, |
||||||
'default_project' => 'home', |
'default_project' => 'home', |
||||||
'check_HTML_tags' => true, |
'check_HTML_tags' => true, |
||||||
'live' => false, //(! \tts\security::is_localhost() ) // Is this Production?? |
'live' => (\tts\site_helper::remote_not_allowed_force_live()), |
||||||
)); |
)); |
||||||
@ -1,5 +1,5 @@ |
|||||||
<?php |
<?php |
||||||
|
|
||||||
\main_tts\configure::set('view_mode', array( |
\tts\configure::set('view_mode', array( |
||||||
'default_paths' => array('json', 'common', 'flexbox', 'default') |
'default_paths' => array('json', 'common', 'flexbox', 'default') |
||||||
)); |
)); |
||||||
@ -1,5 +1,5 @@ |
|||||||
<?php |
<?php |
||||||
|
|
||||||
\main_tts\configure::set('http_request', array( |
\tts\configure::set('http_request', array( |
||||||
'use' => 'sockets', // curl or sockets |
'use' => 'sockets', // curl or sockets |
||||||
)); |
)); |
||||||
|
|||||||
@ -1,5 +1,5 @@ |
|||||||
<?php |
<?php |
||||||
|
|
||||||
\main_tts\configure::set('view_mode', array( |
\tts\configure::set('view_mode', array( |
||||||
'default_paths' => array('json', 'common', 'flexbox', 'default') |
'default_paths' => array('json', 'common', 'flexbox', 'default') |
||||||
)); |
)); |
||||||
@ -1,54 +0,0 @@ |
|||||||
<?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 */ |
|
||||||
|
|
||||||
\main_tts\registry::get('di')->register('html_filter', function() { |
|
||||||
return new \tts\services\html_filter(); |
|
||||||
}); |
|
||||||
/* Contents of : on_log.php */ |
|
||||||
|
|
||||||
\main_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\services\log($file_name, $count); |
|
||||||
} |
|
||||||
|
|
||||||
if (! empty($file_name)) { |
|
||||||
return new \tts\services\log($file_name); |
|
||||||
} |
|
||||||
|
|
||||||
return new \tts\services\log(); |
|
||||||
}); |
|
||||||
/* Contents of : on_templates.php */ |
|
||||||
|
|
||||||
\main_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\services\liquid_templates($file_type); |
|
||||||
}); |
|
||||||
/* Contents of : on_test_db.php */ |
|
||||||
|
|
||||||
\main_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(); |
|
||||||
} |
|
||||||
}); |
|
||||||
@ -1,5 +1,5 @@ |
|||||||
<?php |
<?php |
||||||
|
|
||||||
\main_tts\registry::get('di')->register('html_filter', function() { |
\tts\registry::get('di')->register('html_filter', function() { |
||||||
return new \tts\services\html_filter(); |
return new \tts\html_filter(); |
||||||
}); |
}); |
||||||
@ -1,15 +1,10 @@ |
|||||||
<?php |
<?php |
||||||
|
|
||||||
/** |
\tts\registry::get('di')->register('session_encryption', function($args) { |
||||||
* @author Robert Strutts <Robert@TryingToScale.com> |
|
||||||
* @copyright Copyright (c) 2022, Robert Strutts. |
|
||||||
* @license https://mit-license.org/ |
|
||||||
*/ |
|
||||||
|
|
||||||
\main_tts\registry::get('di')->register('session_encryption', function($args) { |
|
||||||
try { |
try { |
||||||
$key = \main_tts\configure::get('sessions', 'session_key'); |
return new \tts\sodium_storage( |
||||||
return new \tts\services\paragon_crypto\sodium_storage($key); |
\tts\configure::get('sessions', 'session_key') |
||||||
|
); |
||||||
} catch (\Exception $e) { |
} catch (\Exception $e) { |
||||||
|
|
||||||
} |
} |
||||||
|
|||||||
@ -1,9 +1,9 @@ |
|||||||
<?php |
<?php |
||||||
|
|
||||||
\main_tts\registry::get('di')->register('templates', function(array $arg) { |
\tts\registry::get('di')->register('templates', function(array $arg) { |
||||||
$file_type = '.tpl'; |
$file_type = '.tpl'; |
||||||
if (isset($arg[0]) && is_string($arg[0])) { |
if (isset($arg[0]) && is_string($arg[0])) { |
||||||
$file_type = $arg[0]; |
$file_type = $arg[0]; |
||||||
} |
} |
||||||
return new \tts\services\liquid_templates($file_type); |
return new \tts\liquid_templates($file_type); |
||||||
}); |
}); |
||||||
Loading…
Reference in new issue