mirror of
https://gitee.com/zoujingli/ThinkAdmin.git
synced 2025-04-06 03:58:04 +08:00
修改配置文件
This commit is contained in:
parent
5fb289558b
commit
4455a2224b
@ -39,13 +39,13 @@ return [
|
||||
'cors_methods' => 'GET,PUT,POST,PATCH,DELETE',
|
||||
// CORS 跨域头部字段
|
||||
'cors_headers' => 'Api-Type,Api-Name,Api-Uuid,Api-Token,User-Form-Token,User-Token,Token',
|
||||
// 显示错误的消息,仅产品模式有效
|
||||
// 显示错误消息内容,仅产品模式有效
|
||||
'error_message' => '页面错误!请稍后再试~',
|
||||
// 异常模板路径配置,仅开发模式有效
|
||||
'exception_tmpl' => app()->getRootPath() . 'app/admin/view/error.php',
|
||||
'exception_tmpl' => with_path('app/admin/view/error.php'),
|
||||
// 异常状态模板配置,仅生产模式有效
|
||||
'http_exception_template' => [
|
||||
404 => app()->getRootPath() . 'public/static/theme/err/404.html',
|
||||
500 => app()->getRootPath() . 'public/static/theme/err/500.html',
|
||||
404 => with_path('public/static/theme/err/404.html'),
|
||||
500 => with_path('public/static/theme/err/500.html'),
|
||||
],
|
||||
];
|
@ -26,7 +26,7 @@ return [
|
||||
// 是否使用 setcookie
|
||||
'setcookie' => true,
|
||||
// cookie 安全传输,只支持 https 协议
|
||||
'secure' => app()->request->isSsl(),
|
||||
'secure' => request()->isSsl(),
|
||||
// samesite 安全设置,支持 'strict' 'lax' 'none'
|
||||
'samesite' => app()->request->isSsl() ? 'none' : 'lax',
|
||||
'samesite' => request()->isSsl() ? 'none' : 'lax',
|
||||
];
|
||||
|
@ -59,14 +59,14 @@ return [
|
||||
// 监听SQL执行日志
|
||||
'trigger_sql' => true,
|
||||
// 开启字段类型缓存
|
||||
'fields_cache' => !app()->isDebug(),
|
||||
'fields_cache' => is_online(),
|
||||
],
|
||||
'sqlite' => [
|
||||
'charset' => 'utf8',
|
||||
// 数据库类型
|
||||
'type' => 'sqlite',
|
||||
// 数据库文件
|
||||
'database' => app()->getRootPath() . 'database/sqlite.db',
|
||||
'database' => with_path('database/sqlite.db'),
|
||||
// 监听执行日志
|
||||
'trigger_sql' => true,
|
||||
// 其他参数字段
|
||||
|
@ -21,14 +21,14 @@ return [
|
||||
'disks' => [
|
||||
'local' => [
|
||||
'type' => 'local',
|
||||
'root' => app()->getRootPath() . 'runtime' . DIRECTORY_SEPARATOR . 'storage',
|
||||
'root' => with_path('runtime/storage'),
|
||||
],
|
||||
'public' => [
|
||||
// 磁盘类型
|
||||
'type' => 'local',
|
||||
// 磁盘路径
|
||||
'root' => app()->getRootPath() . 'public' . DIRECTORY_SEPARATOR . 'storage',
|
||||
// 磁盘路径对应的外部URL路径
|
||||
'root' => with_path('public/storage'),
|
||||
// 外部路径
|
||||
'url' => '/storage',
|
||||
// 可见性
|
||||
'visibility' => 'public',
|
||||
|
@ -26,7 +26,7 @@ return [
|
||||
// 模板文件名分隔符
|
||||
'view_depr' => DIRECTORY_SEPARATOR,
|
||||
// 模板缓存配置
|
||||
'tpl_cache' => !app()->isDebug(),
|
||||
'tpl_cache' => is_online(),
|
||||
// 模板引擎标签开始标记
|
||||
'tpl_begin' => '{',
|
||||
// 模板引擎标签结束标记
|
||||
|
Loading…
x
Reference in New Issue
Block a user