mirror of
https://github.com/DIYgod/RSSHub.git
synced 2025-12-10 07:12:51 +08:00
feat(config)!: unsafe domain toggle (#11588)
This commit is contained in:
@@ -4,9 +4,13 @@ const md = require('markdown-it')({
|
||||
html: true,
|
||||
});
|
||||
const dayjs = require('dayjs');
|
||||
const { isValidHost } = require('@/utils/valid-host');
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const type = ctx.params.type;
|
||||
if (!isValidHost(type)) {
|
||||
throw Error('Invalid type');
|
||||
}
|
||||
|
||||
const url = `https://${type}.hedwig.pub`;
|
||||
const res = await got({
|
||||
|
||||
Reference in New Issue
Block a user