Skip to content

第三方 https://raw.fgit.cf/ 加速站失效了 #39

@echoniuniu

Description

@echoniuniu

很感谢作者大大的整理,

第三方 https://raw.fgit.cf/ 加速站失效了

可以通过下面的方式替换

GITHUB_PROXY = 'https://mirror.ghproxy.com/'; // 代理地址


async function fetchTVBox() {
	const url = `${GITHUB_PROXY}https://github.com/2hacc/TVBox/raw/main/tvbox.json`;
	const response = await fetch(url);
	const data = await response.json();
	const dataString = JSON.stringify(data);
	const replacedDataString = dataString.replaceAll(
		'https://raw.fgit.cf/2hacc/TVBox/main',
		`${GITHUB_PROXY}https://github.com/2hacc/TVBox/raw/main`
	);
	const replacedData = JSON.parse(replacedDataString);
	return new Response(JSON.stringify(replacedData), {
		headers: { 'Content-Type': 'application/json' }
	});
}

希望未来能够尽可能以不信任第三方链接的形式发布,如提供使用github直链,或类似于Cloudfalre R2 CDN等

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions