Skip to content

fix(route): align Foresight News API request origin#22237

Open
ishowman wants to merge 1 commit into
DIYgod:masterfrom
ishowman:feat/create-branch-for-issue-21667-free
Open

fix(route): align Foresight News API request origin#22237
ishowman wants to merge 1 commit into
DIYgod:masterfrom
ishowman:feat/create-branch-for-issue-21667-free

Conversation

@ishowman

Copy link
Copy Markdown

Involved Issue / 该 PR 相关 Issue

Close #21667

Example for the Proposed Route(s) / 路由地址示例

/foresightnews
/foresightnews/article
/foresightnews/news
/foresightnews/column/1

New RSS Route Checklist / 新 RSS 路由检查表

  • New Route / 新的路由
  • Anti-bot or rate limit / 反爬/频率限制
    • If yes, do your code reflect this sign? / 如果有, 是否有对应的措施?
  • Date and time / 日期和时间
    • Parsed / 可以解析
    • Correct time zone / 时区正确
  • New package added / 添加了新的包
  • Puppeteer

Note / 说明

Adds browser-like request headers for Foresight News API calls so existing routes can fetch data without the 403 reported in the linked issue.

Validated with local route requests returning 200 and non-empty feed items.

@github-actions github-actions Bot added the route label Jun 10, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Auto Review

No clear rule violations found in the current diff.

@github-actions github-actions Bot added the auto: not ready to review Users can't get the RSS feed output according to automated testing results label Jun 10, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Successfully generated as following:

http://localhost:1200/foresightnews - Failed ❌
HTTPError: Response code 503 (Service Unavailable)

Error Message:<br/>FetchError: [GET] &quot;https://api.foresightnews.pro/v2/feed?size=50&quot;: 403
Route: /foresightnews
Full Route: /foresightnews
Node Version: v24.16.0
Git Hash: 1d00a2a5
http://localhost:1200/foresightnews/article - Failed ❌
HTTPError: Response code 503 (Service Unavailable)

Error Message:<br/>FetchError: [GET] &quot;https://api.foresightnews.pro/v1/articles?size=50&quot;: 403
Route: /foresightnews/article
Full Route: /foresightnews/article
Node Version: v24.16.0
Git Hash: 1d00a2a5
http://localhost:1200/foresightnews/news - Failed ❌
HTTPError: Response code 503 (Service Unavailable)

Error Message:<br/>FetchError: [GET] &quot;https://api.foresightnews.pro/v1/news?size=50&quot;: 403
Route: /foresightnews/news
Full Route: /foresightnews/news
Node Version: v24.16.0
Git Hash: 1d00a2a5
http://localhost:1200/foresightnews/column/1 - Failed ❌
HTTPError: Response code 503 (Service Unavailable)

Error Message:<br/>FetchError: [GET] &quot;https://api.foresightnews.pro/v1/articles?size=50&amp;column_id=1&quot;: 403
Route: /foresightnews/column/:id
Full Route: /foresightnews/column/1
Node Version: v24.16.0
Git Hash: 1d00a2a5

@TonyRL TonyRL left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Could you provide a screenshot of the RSS feed output?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auto: not ready to review Users can't get the RSS feed output according to automated testing results route

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Foresight News 路由失效

2 participants