mirror of
https://github.com/DIYgod/RSSHub.git
synced 2026-09-24 23:12:34 +08:00
@@ -5,6 +5,8 @@ module.exports = {
|
||||
ua: process.env.UA || 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.181 Safari/537.36',
|
||||
listenInaddrAny: process.env.LISTEN_INADDR_ANY || 1, // 是否允许公网连接,取值 0 1
|
||||
requestRetry: process.env.REQUEST_RETRY || 2, // 请求失败重试次数
|
||||
// 是否显示 Debug 信息,取值 boolean 'false' 'key' ,取值为 'false' false 时永远不显示,取值为 'key' 时带上 ?debug=key 显示
|
||||
debugInfo: process.env.DEBUG_INFO || true,
|
||||
redis: {
|
||||
url: process.env.REDIS_URL || 'redis://localhost:6379/',
|
||||
options: {
|
||||
|
||||
@@ -33,7 +33,15 @@ router.get('/', async (ctx) => {
|
||||
hotIPsValue += `${ctx.debug.ips[item]} ${item}<br>`;
|
||||
});
|
||||
|
||||
let showDebug;
|
||||
if (!config.debugInfo || config.debugInfo === 'false') {
|
||||
showDebug = false;
|
||||
} else {
|
||||
showDebug = config.debugInfo === true || config.debugInfo === ctx.query.debug;
|
||||
}
|
||||
|
||||
ctx.body = art(path.resolve(__dirname, './views/welcome.art'), {
|
||||
showDebug,
|
||||
debug: [
|
||||
{
|
||||
name: 'git hash',
|
||||
|
||||
@@ -87,6 +87,7 @@
|
||||
<a href="https://diygod.me" target="_blank">DIYgod</a>
|
||||
</p>
|
||||
|
||||
{{ if showDebug }}
|
||||
<details>
|
||||
<summary>debug</summary>
|
||||
{{ each debug }}
|
||||
@@ -96,6 +97,7 @@
|
||||
</div>
|
||||
{{ /each }}
|
||||
</details>
|
||||
{{ /if }}
|
||||
</div>
|
||||
</body>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user