mirror of
https://github.com/DIYgod/RSSHub.git
synced 2025-12-07 13:39:35 +08:00
feat(config)!: unsafe domain toggle (#11588)
This commit is contained in:
@@ -1,7 +1,12 @@
|
||||
const parser = require('@/utils/rss-parser');
|
||||
const config = require('@/config').value;
|
||||
const allowDomain = ['lawrence.code.blog'];
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
if (!config.feature.allow_user_supply_unsafe_domain && !allowDomain.includes(ctx.params.domain)) {
|
||||
ctx.throw(403, `This RSS is disabled unless 'ALLOW_USER_SUPPLY_UNSAFE_DOMAIN' is set to 'true'.`);
|
||||
}
|
||||
|
||||
const scheme = ctx.params.https || 'https';
|
||||
const cdn = config.wordpress.cdnUrl;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user