File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed
Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ import dnsLookupGen from './utils/dns-lookup.js'
66import logger from './utils/logger.js'
77import CacheableLookup from 'cacheable-lookup'
88import { gotSsrf } from 'got-ssrf'
9+ import { PRESETS } from 'header-generator'
910
1011const debug = logger ( 'index.js' )
1112
@@ -22,7 +23,12 @@ export default (
2223 request : 14000 // global timeout
2324 } ,
2425 cache : new QuickLRU ( { maxSize : 10000 } ) ,
25- dnsCache : new CacheableLookup ( { cache : new QuickLRU ( { maxSize : 100000 } ) } )
26+ dnsCache : new CacheableLookup ( { cache : new QuickLRU ( { maxSize : 100000 } ) } ) ,
27+ context : {
28+ insecureHTTPParser : false ,
29+ proxyUrl : process . env . HTTP_PROXY_URL ,
30+ headerGeneratorOptions : PRESETS . MODERN_WINDOWS_CHROME
31+ }
2632 } ,
2733 timeoutMs = 15000 ,
2834 canonicizeMemOpts = { cache : new QuickLRU ( { maxSize : 100000 } ) } ,
Original file line number Diff line number Diff line change 1- import got from 'got'
1+ import { got } from 'got'
22import { gotScraping } from 'got-scraping'
33import { gotSsrf } from 'got-ssrf'
44import canonicizeHookGen from './canonicize.js'
You can’t perform that action at this time.
0 commit comments