Load site settings from dotenv and store OAuth credentials
This commit is contained in:
+4
-2
@@ -1,10 +1,12 @@
|
||||
<?php
|
||||
|
||||
use App\Config\Environment;
|
||||
|
||||
return [
|
||||
'webman' => [
|
||||
'handler' => Webman\App::class,
|
||||
'listen' => getenv('LAYSITE_LISTEN') ?: 'http://127.0.0.1:8787',
|
||||
'count' => max(1, (int) (getenv('LAYSITE_WORKERS') ?: 2)),
|
||||
'listen' => Environment::get('LAYSITE_LISTEN') ?: 'http://127.0.0.1:8787',
|
||||
'count' => max(1, (int) (Environment::get('LAYSITE_WORKERS') ?: 2)),
|
||||
'constructor' => [
|
||||
'requestClass' => App\Http\Request::class,
|
||||
'logger' => support\Log::channel('default'),
|
||||
|
||||
+1
-1
@@ -43,7 +43,7 @@ Route::add(['GET', 'POST'], '/admin/settings', [DesignController::class, 'site']
|
||||
Route::add(['GET', 'POST'], '/admin/backup', [BackupController::class, 'index']);
|
||||
Route::get('/admin/backup/download', [BackupController::class, 'export']);
|
||||
Route::get('/admin/design', [DesignController::class, 'index']);
|
||||
Route::get('/admin/design/{kind:header|footer|palette}/{id:[0-9]+}/preview', [DesignController::class, 'preview']);
|
||||
Route::get('/admin/design/{kind:header|footer|palette}/{id:[0-9]+}/preview', [DesignController::class, 'previewDesign']);
|
||||
Route::add(['GET', 'POST'], '/admin/design/{kind:header|footer|palette}/{key:new|[0-9]+}', [DesignController::class, 'edit']);
|
||||
Route::get('/palette/{id:[0-9]+}.css', [DesignController::class, 'palette']);
|
||||
Route::add(['GET', 'POST'], '/admin/media', [StudioController::class, 'media']);
|
||||
|
||||
+3
-1
@@ -1,5 +1,7 @@
|
||||
<?php
|
||||
|
||||
use App\Config\Environment;
|
||||
|
||||
return [
|
||||
'type' => 'file',
|
||||
'handler' => Webman\Session\FileSessionHandler::class,
|
||||
@@ -9,6 +11,6 @@ return [
|
||||
'cookie_lifetime' => 0,
|
||||
'cookie_path' => '/admin',
|
||||
'http_only' => true,
|
||||
'secure' => getenv('LAYSITE_SECURE_COOKIES') === '1',
|
||||
'secure' => Environment::get('LAYSITE_SECURE_COOKIES') === '1',
|
||||
'same_site' => 'Lax',
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user