mirror of
https://github.com/FlareSolverr/FlareSolverr.git
synced 2025-06-08 12:35:30 +00:00
Make test URL configurable with TEST_URL env var. resolves #240
This commit is contained in:
parent
a24b665bd1
commit
c4ef6a472e
@ -222,6 +222,7 @@ CAPTCHA_SOLVER | none | Captcha solving method. It is used when a captcha is enc
|
||||
TZ | UTC | Timezone used in the logs and the web browser. Example: `TZ=Europe/London`.
|
||||
HEADLESS | true | Only for debugging. To run the web browser in headless mode or visible.
|
||||
BROWSER_TIMEOUT | 30000 | If you are experiencing errors/timeouts because your system is slow, you can try to increase this value. Remember to increase the `maxTimeout` parameter too.
|
||||
TEST_URL | https://www.google.com | FlareSolverr makes a request on start to make sure the web browser is working. You can change that URL if it is blocked in your country.
|
||||
PORT | 8191 | Listening port. You don't need to change this if you are running on Docker.
|
||||
HOST | 0.0.0.0 | Listening interface. You don't need to change this if you are running on Docker.
|
||||
|
||||
|
@ -94,11 +94,13 @@ export async function testWebBrowserInstallation(): Promise<void> {
|
||||
log.debug("FlareSolverr user home directory is OK: " + homeDir)
|
||||
|
||||
// test web browser
|
||||
const testUrl = process.env.TEST_URL || "https://www.google.com";
|
||||
log.debug("Test URL: " + testUrl)
|
||||
const session = await create(null, {
|
||||
oneTimeSession: true
|
||||
})
|
||||
const page = await session.browser.newPage()
|
||||
await page.goto("https://www.google.com")
|
||||
await page.goto(testUrl)
|
||||
webBrowserUserAgent = await page.evaluate(() => navigator.userAgent)
|
||||
|
||||
// replace Linux ARM user-agent because it's detected
|
||||
|
Loading…
x
Reference in New Issue
Block a user