TwurpleAuthenticationGetting dataExamplesFAQMigration

EventSubMiddlewareConfig

The configuration of the EventSub middleware.

{
The API client that will be used to subscribe to events.
Whether to add additional helper routes such as the test route at the root.
helperRoutes?: boolean
The host name the root application is available under.
hostName: string
Options to pass to the logger.
logger?: Partial<LoggerOptions>
The path your listener is mounted under.
pathPrefix?: string
Your EventSub secret.
secret: string
Whether to ignore packets that are not sent with a Host header matching the configured host name.
strictHostCheck?: boolean
Whether the path prefix will added to the mount point. Defaults to `true`.
}

Properties

apiClient

Type: ApiClient

The API client that will be used to subscribe to events.

helperRoutes

Type: ?boolean

Whether to add additional helper routes such as the test route at the root.

Enabled by default. Set this to false to disable it.

hostName

Type: string

The host name the root application is available under.

logger

Type: ?Partial<LoggerOptions>

Options to pass to the logger.

pathPrefix

Type: ?string

The path your listener is mounted under.

secret

Type: string

Your EventSub secret.

This should be a randomly generated string, but it should be the same between restarts.

WARNING: Please do not use your application's client secret!

strictHostCheck

Type: ?boolean

Whether to ignore packets that are not sent with a Host header matching the configured host name.

Enabled by default. Set this to false to disable it.

usePathPrefixInHandlers

Type: ?boolean

Whether the path prefix will added to the mount point. Defaults to true.

Must be false if you use this with subrouters.