Interface: ServerOptions
The API options.
Since
1.0.0
Properties
acceptedContentMimeTypes?
optional
acceptedContentMimeTypes:null
| (`message/${string}` | `audio/${string}` | `video/${string}` | `image/${string}` | `text/${string}` | `application/${string}` | `multipart/${string}` | `X-${string}/${string}`)[]
The accepted content types for this route. If set to null, the route will accept any data.
Since
1.3.0
Default
null
Defined in
projects/plugins/packages/api/src/lib/structures/http/Server.ts:212
auth?
optional
auth:ServerOptionsAuth
The auth options. If neither auth
nor auth.secret
are defined, auth-related routes and middlewares will be
automatically disabled.
Since
1.0.0
Default
{}
Defined in
projects/plugins/packages/api/src/lib/structures/http/Server.ts:234
automaticallyConnect?
optional
automaticallyConnect:boolean
Whether the server should connect upon being when the plugin is loaded.
Since
3.2.0
Default
true
Defined in
projects/plugins/packages/api/src/lib/structures/http/Server.ts:241
listenOptions?
optional
listenOptions:ListenOptions
The HTTP listen options.
Since
1.0.0
Default
{ port: 4000 }
Defined in
projects/plugins/packages/api/src/lib/structures/http/Server.ts:226
maximumBodyLength?
optional
maximumBodyLength:number
(RFC 7230 3.3.2) The maximum decimal number of octets.
Since
1.0.0
Default
1024 * 1024 * 50
Defined in
projects/plugins/packages/api/src/lib/structures/http/Server.ts:205
origin?
optional
origin:string
The origin header to be set on every request at 'Access-Control-Allow-Origin'.
Since
1.0.0
Default
'*'
Defined in
projects/plugins/packages/api/src/lib/structures/http/Server.ts:198
prefix?
optional
prefix:string
The prefix for all routes, e.g. v1/
.
Since
1.0.0
Default
''
Defined in
projects/plugins/packages/api/src/lib/structures/http/Server.ts:191
server?
optional
server:ServerOptions
<typeofIncomingMessage
, typeofServerResponse
>
The HTTP server options.
Since
1.0.0
Default
{}
Defined in
projects/plugins/packages/api/src/lib/structures/http/Server.ts:219