@@ -209,6 +209,8 @@ def _set_chrome_options(
209
209
chrome_options .add_argument ("--disable-single-click-autofill" )
210
210
chrome_options .add_argument ("--disable-translate" )
211
211
chrome_options .add_argument ("--disable-web-security" )
212
+ chrome_options .add_argument ("--homepage=about:blank" )
213
+ chrome_options .add_argument ("--dom-automation" )
212
214
if servername == "localhost" or servername == "127.0.0.1" :
213
215
chrome_options .add_experimental_option ("useAutomationExtension" , False )
214
216
if (settings .DISABLE_CSP_ON_CHROME or disable_csp ) and not headless :
@@ -223,6 +225,8 @@ def _set_chrome_options(
223
225
chrome_options = _add_chrome_proxy_extension (
224
226
chrome_options , proxy_string , proxy_user , proxy_pass )
225
227
chrome_options .add_argument ('--proxy-server=%s' % proxy_string )
228
+ else :
229
+ chrome_options .add_argument ("--no-proxy-server" )
226
230
if headless :
227
231
if not proxy_auth :
228
232
# Headless Chrome doesn't support extensions, which are
@@ -231,10 +235,10 @@ def _set_chrome_options(
231
235
# using Chrome's built-in headless mode. See link for details:
232
236
# https://bugs.chromium.org/p/chromium/issues/detail?id=706008
233
237
chrome_options .add_argument ("--headless" )
234
- if headless or disable_gpu :
235
- chrome_options .add_argument ("--disable-gpu" )
236
- if (headless and "linux" in PLATFORM ) or no_sandbox :
237
- chrome_options .add_argument ("--no-sandbox" )
238
+ # if headless or disable_gpu:
239
+ chrome_options .add_argument ("--disable-gpu" ) # (Now always on )
240
+ # if (headless and "linux" in PLATFORM) or no_sandbox:
241
+ chrome_options .add_argument ("--no-sandbox" ) # (Now always on )
238
242
if "linux" in PLATFORM :
239
243
chrome_options .add_argument ("--disable-dev-shm-usage" )
240
244
return chrome_options
0 commit comments