-
Notifications
You must be signed in to change notification settings - Fork 359
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
修复自建实例更新规则时,访问密钥未添加到更新链接的问题 #1044
Conversation
if(url.endsWith('/')){ | ||
url = url.substring(0,url.length-1) | ||
} | ||
url += "?key="+encodeURIComponent(config.rsshubAccessControl.accessKey) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use code
instead of key
RSSHub-Radar/src/popup/RSSItem.tsx
Line 40 in cf4030d
url = `${url}?code=${new MD5().update(item.path + config.rsshubAccessControl.accessKey).digest("hex")}` |
if(config.rsshubAccessControl.accessKey&&url.indexOf('rsshub.app')==-1){ | ||
if(url.endsWith('/')){ | ||
url = url.substring(0,url.length-1) | ||
} | ||
url += "?key="+encodeURIComponent(config.rsshubAccessControl.accessKey) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be more appropriate to update getRadarRulesUrl
instead
Lines 46 to 48 in cf4030d
export function getRadarRulesUrl(rsshubDomain: string) { | |
return `${rsshubDomain}/api/radar/rules` | |
} |
@@ -40,8 +40,15 @@ export function getRemoteRules() { | |||
return new Promise<string>(async (resolve, reject) => { | |||
const config = await getConfig() | |||
try { | |||
const res = await fetch(getRadarRulesUrl(config.rsshubDomain)) | |||
resolve(res.text()) | |||
var url = getRadarRulesUrl(config.rsshubDomain) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No var
Fixed in #1048 |
No description provided.