@sebastianwessel/quickjs v2.1.1
@sebastianwessel/quickjs / GetFetchAdapterOptions
Type Alias: GetFetchAdapterOptions
GetFetchAdapterOptions:
object
Defined in: src/adapter/fetch.ts:12
Options for creating the default fetch adapter
Type declaration
allowedCorsOrigins?
optional
allowedCorsOrigins:string
[]
List of allowed CORS origins
Default
['*']
allowedHosts?
optional
allowedHosts:string
[]
List of allowed hosts. If set, only these hosts are allowed to call
allowedProtocols?
optional
allowedProtocols:string
[]
List of allowed protocols. If set, only these protocols are allowed to call
corsCheck?
optional
corsCheck:boolean
Flag to enable CORS policy check
Default
false
disallowedHosts?
optional
disallowedHosts:string
[]
List of disallowed hosts. If set, these hosts are not allowed to call
Default
['localhost', '127.0.0.1']
fs?
optional
fs:IFs
The virtual file system of the sandbox (excludes node_modules)
rateLimitDuration?
optional
rateLimitDuration:number
Duration in seconds for the rate limit
Default
1
rateLimitPoints?
optional
rateLimitPoints:number
Number of requests allowed in the specified duration
Default
10
timeout?
optional
timeout:number
Timeout for fetch requests in milliseconds
Default
5000