feat: node name

This commit is contained in:
DIYgod
2019-08-15 23:58:50 +08:00
parent eba8f46875
commit c187811b97
8 changed files with 25 additions and 2 deletions

View File

@@ -6,6 +6,9 @@ const headers = {
'Content-Type': 'application/xml; charset=utf-8',
'Cache-Control': `public, max-age=${config.cache.routeExpire}`,
};
if (config.nodeName) {
headers['RSSHub-Node'] = config.nodeName;
}
module.exports = async (ctx, next) => {
logger.info(`${ctx.url}, user IP: ${ctx.ips[0] || ctx.ip}`);