Skip to content

Commit

Permalink
Add support for specifying the starting URL
Browse files Browse the repository at this point in the history
Some JS API's check the http referer when used (Google Maps JS API, for example). Specify the `STARTING_URL` as an env variable to set ensure these requests function as expected.
  • Loading branch information
danielwestendorf committed Jan 14, 2020
1 parent a199ba9 commit 5add888
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@ const webServer = new Server({
console.log('Starting Google Chrome')

ChromeLauncher.launch({
chromeFlags: ['--headless', '--disable-gpu', '--disable-dev-shm-usage', '--no-sandbox', '--hide-scrollbars'],
port: 9222
chromeFlags: ['--disable-gpu', '--disable-dev-shm-usage', '--no-sandbox', '--hide-scrollbars'],
port: 9222,
startingUrl: (process.env.STARTING_URL || 'about:blank')
}).then((chrome) => {
console.log(`Chrome debugging port running on ${chrome.port}`)

Expand Down

0 comments on commit 5add888

Please sign in to comment.