修改配置文件

This commit is contained in:
邹景立 2022-10-19 12:45:16 +08:00
parent 5fb289558b
commit 4455a2224b
5 changed files with 12 additions and 12 deletions

View File

@ -39,13 +39,13 @@ return [
'cors_methods' => 'GET,PUT,POST,PATCH,DELETE', 'cors_methods' => 'GET,PUT,POST,PATCH,DELETE',
// CORS 跨域头部字段 // CORS 跨域头部字段
'cors_headers' => 'Api-Type,Api-Name,Api-Uuid,Api-Token,User-Form-Token,User-Token,Token', 'cors_headers' => 'Api-Type,Api-Name,Api-Uuid,Api-Token,User-Form-Token,User-Token,Token',
// 显示错误消息,仅产品模式有效 // 显示错误消息内容,仅产品模式有效
'error_message' => '页面错误!请稍后再试~', 'error_message' => '页面错误!请稍后再试~',
// 异常模板路径配置,仅开发模式有效 // 异常模板路径配置,仅开发模式有效
'exception_tmpl' => app()->getRootPath() . 'app/admin/view/error.php', 'exception_tmpl' => with_path('app/admin/view/error.php'),
// 异常状态模板配置,仅生产模式有效 // 异常状态模板配置,仅生产模式有效
'http_exception_template' => [ 'http_exception_template' => [
404 => app()->getRootPath() . 'public/static/theme/err/404.html', 404 => with_path('public/static/theme/err/404.html'),
500 => app()->getRootPath() . 'public/static/theme/err/500.html', 500 => with_path('public/static/theme/err/500.html'),
], ],
]; ];

View File

@ -26,7 +26,7 @@ return [
// 是否使用 setcookie // 是否使用 setcookie
'setcookie' => true, 'setcookie' => true,
// cookie 安全传输,只支持 https 协议 // cookie 安全传输,只支持 https 协议
'secure' => app()->request->isSsl(), 'secure' => request()->isSsl(),
// samesite 安全设置,支持 'strict' 'lax' 'none' // samesite 安全设置,支持 'strict' 'lax' 'none'
'samesite' => app()->request->isSsl() ? 'none' : 'lax', 'samesite' => request()->isSsl() ? 'none' : 'lax',
]; ];

View File

@ -59,14 +59,14 @@ return [
// 监听SQL执行日志 // 监听SQL执行日志
'trigger_sql' => true, 'trigger_sql' => true,
// 开启字段类型缓存 // 开启字段类型缓存
'fields_cache' => !app()->isDebug(), 'fields_cache' => is_online(),
], ],
'sqlite' => [ 'sqlite' => [
'charset' => 'utf8', 'charset' => 'utf8',
// 数据库类型 // 数据库类型
'type' => 'sqlite', 'type' => 'sqlite',
// 数据库文件 // 数据库文件
'database' => app()->getRootPath() . 'database/sqlite.db', 'database' => with_path('database/sqlite.db'),
// 监听执行日志 // 监听执行日志
'trigger_sql' => true, 'trigger_sql' => true,
// 其他参数字段 // 其他参数字段

View File

@ -21,14 +21,14 @@ return [
'disks' => [ 'disks' => [
'local' => [ 'local' => [
'type' => 'local', 'type' => 'local',
'root' => app()->getRootPath() . 'runtime' . DIRECTORY_SEPARATOR . 'storage', 'root' => with_path('runtime/storage'),
], ],
'public' => [ 'public' => [
// 磁盘类型 // 磁盘类型
'type' => 'local', 'type' => 'local',
// 磁盘路径 // 磁盘路径
'root' => app()->getRootPath() . 'public' . DIRECTORY_SEPARATOR . 'storage', 'root' => with_path('public/storage'),
// 磁盘路径对应的外部URL路径 // 外部路径
'url' => '/storage', 'url' => '/storage',
// 可见性 // 可见性
'visibility' => 'public', 'visibility' => 'public',

View File

@ -26,7 +26,7 @@ return [
// 模板文件名分隔符 // 模板文件名分隔符
'view_depr' => DIRECTORY_SEPARATOR, 'view_depr' => DIRECTORY_SEPARATOR,
// 模板缓存配置 // 模板缓存配置
'tpl_cache' => !app()->isDebug(), 'tpl_cache' => is_online(),
// 模板引擎标签开始标记 // 模板引擎标签开始标记
'tpl_begin' => '{', 'tpl_begin' => '{',
// 模板引擎标签结束标记 // 模板引擎标签结束标记