mirror of
https://github.com/DIYgod/RSSHub.git
synced 2025-12-10 23:34:38 +08:00
fix(route): invalid url (#11597)
This commit is contained in:
@@ -12,7 +12,7 @@ module.exports = async (ctx) => {
|
||||
starred: 'Most stars',
|
||||
all: 'All',
|
||||
};
|
||||
if (!config.feature.allow_user_supply_unsafe_domain && !allowHost.includes(new URL(host).hostname)) {
|
||||
if (!config.feature.allow_user_supply_unsafe_domain && !allowHost.includes(new URL(`https://${host}/`).hostname)) {
|
||||
ctx.throw(403, `This RSS is disabled unless 'ALLOW_USER_SUPPLY_UNSAFE_DOMAIN' is set to 'true'.`);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user