Updated preloading
This commit is contained in:
parent
18f2074584
commit
0029971517
18
app/app.php
18
app/app.php
|
@ -15,20 +15,12 @@ use Appwrite\Database\Document;
|
|||
use Appwrite\Database\Validator\Authorization;
|
||||
use Appwrite\Network\Validator\Origin;
|
||||
|
||||
Config::setParam('domain', $_SERVER['HTTP_HOST']);
|
||||
Config::setParam('domain', 'localhost');
|
||||
Config::setParam('domainVerification', false);
|
||||
// Config::setParam('domain', $request->getServer('HTTP_HOST', ''));
|
||||
// Config::setParam('domainVerification', false);
|
||||
|
||||
\define('COOKIE_DOMAIN',
|
||||
(
|
||||
$_SERVER['HTTP_HOST'] === 'localhost' ||
|
||||
$_SERVER['HTTP_HOST'] === 'localhost:'.$request->getPort() ||
|
||||
(\filter_var($request->getHostname(), FILTER_VALIDATE_IP) !== false)
|
||||
)
|
||||
? null
|
||||
: '.'.$request->getHostname()
|
||||
);
|
||||
\define('COOKIE_DOMAIN', 'localhost');
|
||||
\define('COOKIE_SAMESITE', Response::COOKIE_SAMESITE_NONE);
|
||||
|
||||
// \define('COOKIE_DOMAIN',
|
||||
|
@ -452,8 +444,4 @@ include_once __DIR__ . '/controllers/shared/web.php';
|
|||
|
||||
foreach(Config::getParam('services', []) as $service) {
|
||||
include_once $service['controller'];
|
||||
}
|
||||
|
||||
$app = new App('Asia/Tel_Aviv');
|
||||
|
||||
$app->run(new Request(), new Response());
|
||||
}
|
|
@ -18,8 +18,12 @@ if (file_exists(__DIR__.'/../vendor/autoload.php')) {
|
|||
|
||||
use Appwrite\Preloader\Preloader;
|
||||
|
||||
include 'init.php';
|
||||
include 'app.php';
|
||||
|
||||
(new Preloader())
|
||||
->paths(realpath(__DIR__ . '/../app/config'))
|
||||
->paths(realpath(__DIR__ . '/../app/controllers'))
|
||||
->paths(realpath(__DIR__ . '/../src'))
|
||||
->ignore(realpath(__DIR__ . '/../vendor/twig/twig'))
|
||||
->ignore(realpath(__DIR__ . '/../vendor/guzzlehttp/guzzle'))
|
||||
|
|
|
@ -8,6 +8,10 @@
|
|||
* ― Rick Cook, The Wizardry Compiled
|
||||
*/
|
||||
|
||||
use Utopia\App;
|
||||
use Utopia\Request;
|
||||
use Utopia\Response;
|
||||
|
||||
error_reporting(0);
|
||||
ini_set('display_errors', 0);
|
||||
|
||||
|
@ -17,3 +21,7 @@ error_reporting(E_ALL);
|
|||
//trigger_error('hide errors in prod', E_USER_NOTICE);
|
||||
|
||||
include __DIR__ . '/../app/app.php';
|
||||
|
||||
$app = new App('Asia/Tel_Aviv');
|
||||
|
||||
$app->run(new Request(), new Response());
|
Loading…
Reference in a new issue