Merge pull request #66 from movie-web/fix-showbox-useragent

Fix showbox + add support for new simple-proxy version
This commit is contained in:
William Oldham
2024-01-06 14:44:00 +00:00
committed by GitHub
2 changed files with 3 additions and 1 deletions

View File

@@ -7,6 +7,8 @@ const headerMap: Record<string, string> = {
cookie: 'X-Cookie',
referer: 'X-Referer',
origin: 'X-Origin',
'user-agent': 'X-User-Agent',
'x-real-ip': 'X-X-Real-Ip',
};
const responseHeaderMap: Record<string, string> = {

View File

@@ -49,9 +49,9 @@ export const sendRequest = async (ctx: ScrapeContext, data: object, altApi = fal
headers: {
Platform: 'android',
'Content-Type': 'application/x-www-form-urlencoded',
'User-Agent': 'okhttp/3.2.0',
},
body: formatted,
});
return JSON.parse(response);
};