Skip to content

Commit

Permalink
to: 修改pximg地址
Browse files Browse the repository at this point in the history
  • Loading branch information
journey-ad committed Oct 31, 2024
1 parent bfabfaa commit 98fdd2f
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/api/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,14 @@ const isSupportWebP = (() => {
return false;
})();

const imgProxyList = [
'pximg.jad-sub-0.workers.dev',
'pximg.jad-sub-1.workers.dev',
'pximg.jad-sub-2.workers.dev',
]

const imgProxy = url => {
let result = url.replace(/i.pximg.net/g, 'pximg.journey-ad.workers.dev')
let result = url.replace(/i.pximg.net/g, imgProxyList[Math.floor(Math.random() * imgProxyList.length)])

if (!isSupportWebP) {
result = result.replace(/_10_webp/g, '_70')
Expand Down

0 comments on commit 98fdd2f

Please sign in to comment.