Interface: ServerOptions
api/src.ServerOptions
The API options.
since
1.0.0
Properties
acceptedContentMimeTypes
• Optional
acceptedContentMimeTypes: null
| (`text/${string}` | `multipart/${string}` | `message/${string}` | `image/${string}` | `audio/${string}` | `video/${string}` | `application/${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:199
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:221
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:228
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:213
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:192
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:185
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:178
server
• Optional
server: ServerOptions
The HTTP server options.
since
1.0.0
default
{}
Defined in
projects/plugins/packages/api/src/lib/structures/http/Server.ts:206