TwurpleAuthenticationGetting dataExamplesFAQMigration

ReverseProxyAdapter

A WebHook connection adapter that supports a reverse proxy in front of the listener.

Constructor

new ReverseProxyAdapter(options)

Creates a reverse proxy connection adapter.

ParameterTypeRequiredDefaultDescription
optionsReverseProxyAdapterConfignonesee below
options.hostNamestringnone

The host name the reverse proxy is available under.

options.pathPrefixstringnone

The path prefix your reverse proxy redirects to the listener.

options.portnumbernone

The port the server should listen to.

If not given, defaults to 8080.

options.usePathPrefixInHandlersbooleannone

Whether the path prefix is passed to the handler.

Defaults to false which means that the layer redirecting to this server needs to strip the path prefix in order for it to work.

For example, if the path prefix is set to /hooks, an external connection to /hooks/abc should pass /abc as the path to this server.

Conversely, if this is set to true, the path should be passed as is (i.e. /hooks/abc).