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

请求开放同步状态数据的跨域访问 #1

Closed
ZenithalHourlyRate opened this issue Mar 20, 2021 · 2 comments
Closed

请求开放同步状态数据的跨域访问 #1

ZenithalHourlyRate opened this issue Mar 20, 2021 · 2 comments

Comments

@ZenithalHourlyRate
Copy link

同步状态数据的 url 是 https://mirrors.xjtu.edu.cn/api/status.json ,该数据也可用于其他项目(例如 mirrorz),故请求开放其跨域访问,或者几个特定站的跨域访问。

具体方法为添加 Access-Control-Allow-Origin: * 的头或者(在referer: https://mirrorz.org/时)添加 Access-Control-Allow-Origin: https://mirrorz.org

目前存在通过本地获取贵站状态生成的供 mirrorz 使用的站点信息,但随着时间推移已经较为过时,参考 https://mirrorz.org/site/XJTUhttps://github.com/tuna/mirrorz/blob/master/static/tmp/xjtu.json

参考 PKUOSC/issues#2

@AirWSW
Copy link
Contributor

AirWSW commented Apr 9, 2021

已添加

@ZenithalHourlyRate
Copy link
Author

感谢。另请参考 mirrorz-org/mirrorz#10

ZenithalHourlyRate added a commit to mirrorz-org/mirrorz-config that referenced this issue Aug 5, 2021
ZenithalHourlyRate added a commit to mirrorz-org/mirrorz-json-legacy that referenced this issue Aug 5, 2021
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

No branches or pull requests

2 participants