Fix showbox + add support for new simple-proxy version
This commit is contained in:
parent
1d2dbcf903
commit
f1c29aab90
|
@ -7,6 +7,7 @@ const headerMap: Record<string, string> = {
|
||||||
cookie: 'X-Cookie',
|
cookie: 'X-Cookie',
|
||||||
referer: 'X-Referer',
|
referer: 'X-Referer',
|
||||||
origin: 'X-Origin',
|
origin: 'X-Origin',
|
||||||
|
'user-agent': 'X-User-Agent',
|
||||||
};
|
};
|
||||||
|
|
||||||
const responseHeaderMap: Record<string, string> = {
|
const responseHeaderMap: Record<string, string> = {
|
||||||
|
|
|
@ -49,9 +49,9 @@ export const sendRequest = async (ctx: ScrapeContext, data: object, altApi = fal
|
||||||
headers: {
|
headers: {
|
||||||
Platform: 'android',
|
Platform: 'android',
|
||||||
'Content-Type': 'application/x-www-form-urlencoded',
|
'Content-Type': 'application/x-www-form-urlencoded',
|
||||||
|
'User-Agent': 'okhttp/3.2.0',
|
||||||
},
|
},
|
||||||
body: formatted,
|
body: formatted,
|
||||||
});
|
});
|
||||||
|
|
||||||
return JSON.parse(response);
|
return JSON.parse(response);
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue