Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
jooooock committed Oct 21, 2024
1 parent 40c2326 commit 2ed158d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@


## ⚠️⚠️⚠️ 注意
从 2024-10-21 开始,下载机制进行了调整,音视频的下载不再经由代理服务器处理,而改为需要配合浏览器插件解决跨域问题。
从 2024-10-21 开始,下载机制进行了调整,**音视频的下载** 不再经由代理服务器处理,而改为需要配合浏览器插件解决跨域问题。

这里推荐用 [ModHeader插件](https://modheader.com/),插件的配置如下:
![img.png](img.png)
Expand Down
3 changes: 1 addition & 2 deletions utils/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,8 @@ export function formatItemShowType(type: number) {
* @param timeout 超时时间(单位: 秒),默认 30
*/
async function downloadAssetWithProxy<T extends Blob | string>(url: string, proxy: string | undefined, timeout = 30) {
// 客户端并不使用真正的代理,只是用于并发控制
let targetURL = proxy ? `${proxy}?url=${encodeURIComponent(url)}` : url
// let targetURL = url
targetURL = targetURL.replace(/^http:\/\//, 'https://')
const result = await $fetch<T>(targetURL, {
retry: 0,
timeout: timeout * 1000,
Expand Down

0 comments on commit 2ed158d

Please sign in to comment.