Fix showbox + add support for new simple-proxy version

This commit is contained in:
mrjvs 2024-01-04 21:11:24 +01:00
parent 1d2dbcf903
commit f1c29aab90
2 changed files with 2 additions and 1 deletions

View File

@ -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> = {

View File

@ -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);
}; };