Skip to content
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

Closed
wants to merge 1 commit into from

Conversation

murphysking
Copy link

No description provided.

if(url.endsWith('/')){
url = url.substring(0,url.length-1)
}
url += "?key="+encodeURIComponent(config.rsshubAccessControl.accessKey)
Copy link
Contributor

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

url = `${url}?code=${new MD5().update(item.path + config.rsshubAccessControl.accessKey).digest("hex")}`

Comment on lines +44 to +48
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)
Copy link
Contributor

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

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)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No var

@DIYgod
Copy link
Owner

DIYgod commented Oct 13, 2024

Fixed in #1048

@DIYgod DIYgod closed this Oct 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants