Skip to content

Commit

Permalink
fix: 修复taomeesdk登录问题
Browse files Browse the repository at this point in the history
  • Loading branch information
median-dxz committed Feb 25, 2025
1 parent caffb29 commit d023ea4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/server/src/middlewares/appJsProxy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export const createAppJsProxy: FastifyPluginCallback = (fastify, _opts, done) =>
script
.replace(
`(n?"https:":window.location.protocol)+u.b`,
`(window.location.origin+u.b.replace("//","/"))`
`(window.location.origin+u.b.slice(1,u.b.length-1))`
)
.replace(`t&&t[0]===i.a`, `((t && t[0] === i.a) || (i.a === 'localhost'))`)
.replace(`//support-res.61.com`, `api/js/support-res.61.com`)
Expand Down
2 changes: 1 addition & 1 deletion packages/server/src/middlewares/loginProxy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export const loginProxy = createProxyMiddleware({
rawBuf = zlib.gunzipSync(rawBuf);
}

if (['r=AccountManager', 'v3?r=login'].some((part) => url.includes(part))) {
if (['r=AccountManager', 'v3?r=login', 'history?duid='].some((part) => url.includes(part))) {
let body = rawBuf.toString();
body = body
.replaceAll(/: "\/v3/g, `: "/account-co.61.com/v3`)
Expand Down

0 comments on commit d023ea4

Please sign in to comment.