Skip to content

@sebastianwessel/quickjs v3.0.1


@sebastianwessel/quickjs / GetFetchAdapterOptions

Type Alias: GetFetchAdapterOptions

GetFetchAdapterOptions = object

Defined in: adapter/fetch.ts:14

Options for creating the default fetch adapter

Properties

allowedCorsOrigins?

optional allowedCorsOrigins: string[]

Defined in: adapter/fetch.ts:46

List of allowed CORS origins

Default

ts
['*']

allowedHosts?

optional allowedHosts: string[]

Defined in: adapter/fetch.ts:22

List of allowed hosts. If set, only these hosts are allowed to call


allowedProtocols?

optional allowedProtocols: string[]

Defined in: adapter/fetch.ts:26

List of allowed protocols. If set, only these protocols are allowed to call


corsCheck?

optional corsCheck: boolean

Defined in: adapter/fetch.ts:41

Flag to enable CORS policy check

Default

ts
false

disallowedHosts?

optional disallowedHosts: string[]

Defined in: adapter/fetch.ts:31

List of disallowed hosts. If set, these hosts are not allowed to call

Default

ts
['localhost', '127.0.0.1']

fs?

optional fs: IFs

Defined in: adapter/fetch.ts:18

The virtual file system of the sandbox (excludes node_modules)


rateLimitDuration?

optional rateLimitDuration: number

Defined in: adapter/fetch.ts:56

Duration in seconds for the rate limit

Default

ts
1

rateLimitPoints?

optional rateLimitPoints: number

Defined in: adapter/fetch.ts:51

Number of requests allowed in the specified duration

Default

ts
10

timeout?

optional timeout: number

Defined in: adapter/fetch.ts:36

Timeout for fetch requests in milliseconds

Default

ts
5000

Updated at: