mirror of
https://github.com/FlareSolverr/FlareSolverr.git
synced 2025-06-07 20:15:24 +00:00
Add aarch64 to user agents to be replaced (#248)
Co-authored-by: Simon <simon@perols.dev>
This commit is contained in:
parent
b1a6ad7688
commit
a9ab2569bc
@ -121,8 +121,8 @@ export async function testWebBrowserInstallation(): Promise<void> {
|
||||
webBrowserUserAgent = await page.evaluate(() => navigator.userAgent)
|
||||
|
||||
// replace Linux ARM user-agent because it's detected
|
||||
if (webBrowserUserAgent.toLocaleLowerCase().includes('linux arm')) {
|
||||
webBrowserUserAgent = webBrowserUserAgent.replace(/linux arm[^;]+;/i, 'Linux x86_64;')
|
||||
if (["arm", "aarch64"].some(arch => webBrowserUserAgent.toLocaleLowerCase().includes('linux ' + arch))) {
|
||||
webBrowserUserAgent = webBrowserUserAgent.replace(/linux \w+;/i, 'Linux x86_64;')
|
||||
}
|
||||
|
||||
log.info("FlareSolverr User-Agent: " + webBrowserUserAgent)
|
||||
|
Loading…
x
Reference in New Issue
Block a user