mirror of
https://github.com/DIYgod/RSSHub.git
synced 2025-12-05 04:11:26 +08:00
Merge branch 'pr/tuzi3040/6741'
This commit is contained in:
@@ -423,7 +423,7 @@ See the relation between access key/code and white/blacklisting.
|
||||
|
||||
`REQUEST_RETRY`: retries allowed for failed requests, default to `2`
|
||||
|
||||
`DEBUG_INFO`: display route information on homepage for debugging purpose, default to `true`
|
||||
`DEBUG_INFO`: display route information on homepage for debugging purpose. When set to neither `true` nor `false`, use parameter `debug` to enable display, eg: <https://rsshub.app/?debug=value_of_DEBUG_INFO> . Default to `true`
|
||||
|
||||
`NODE_ENV`: display error message on pages for authentication failing, default to `production` (i.e. no display)
|
||||
|
||||
|
||||
@@ -451,7 +451,7 @@ RSSHub 支持使用访问密钥 / 码,白名单和黑名单三种方式进行
|
||||
|
||||
`REQUEST_RETRY`: 请求失败重试次数,默认 `2`
|
||||
|
||||
`DEBUG_INFO`: 是否在首页显示路由信息,默认 `true`
|
||||
`DEBUG_INFO`: 是否在首页显示路由信息。值为非 `true` `false` 时,在请求中带上参数 `debug` 开启显示,例如:<https://rsshub.app/?debug=value_of_DEBUG_INFO> 。默认 `true`
|
||||
|
||||
`NODE_ENV`: 是否显示错误输出,默认 `production` (即关闭输出)
|
||||
|
||||
|
||||
@@ -39,8 +39,8 @@ const calculateValue = () => {
|
||||
ua: envs.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: envs.LISTEN_INADDR_ANY || 1, // 是否允许公网连接,取值 0 1
|
||||
requestRetry: parseInt(envs.REQUEST_RETRY) || 2, // 请求失败重试次数
|
||||
// 是否显示 Debug 信息,取值 boolean 'false' 'key' ,取值为 'false' false 时永远不显示,取值为 'key' 时带上 ?debug=key 显示
|
||||
debugInfo: envs.DEBUG_INFO || true,
|
||||
// 是否显示 Debug 信息,取值 'true' 'false' 'some_string' ,取值为 'true' 时永久显示,取值为 'false' 时永远隐藏,取值为 'some_string' 时请求带上 '?debug=some_string' 显示
|
||||
debugInfo: envs.DEBUG_INFO || 'true',
|
||||
disallowRobot: envs.DISALLOW_ROBOT !== '0' && envs.DISALLOW_ROBOT !== 'false',
|
||||
titleLengthLimit: parseInt(envs.TITLE_LENGTH_LIMIT) || 150,
|
||||
redis: {
|
||||
|
||||
@@ -52,7 +52,7 @@ module.exports = async (ctx) => {
|
||||
if (!config.debugInfo || config.debugInfo === 'false') {
|
||||
showDebug = false;
|
||||
} else {
|
||||
showDebug = config.debugInfo === true || config.debugInfo === ctx.query.debug;
|
||||
showDebug = config.debugInfo === 'true' || config.debugInfo === ctx.query.debug;
|
||||
}
|
||||
const { disallowRobot } = config;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user