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'
6
6
import logger from './utils/logger.js'
7
7
import CacheableLookup from 'cacheable-lookup'
8
8
import { gotSsrf } from 'got-ssrf'
9
+ import { PRESETS } from 'header-generator'
9
10
10
11
const debug = logger ( 'index.js' )
11
12
@@ -22,7 +23,12 @@ export default (
22
23
request : 14000 // global timeout
23
24
} ,
24
25
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
+ }
26
32
} ,
27
33
timeoutMs = 15000 ,
28
34
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'
2
2
import { gotScraping } from 'got-scraping'
3
3
import { gotSsrf } from 'got-ssrf'
4
4
import canonicizeHookGen from './canonicize.js'
You can’t perform that action at this time.
0 commit comments