Optional
corsBy default all handlers support CORS headers, pass false
here to disallow
access to fetch requests.
Optional
fallbackIf the request does not have a Connection: upgrade
header, pass a
fallback here to handle the request normally, otherwise the request
will be rejected with a 400 error.
Optional
maxThe maximum message size to be sent or received over the socket in bytes
Optional
methodA list of HTTP verbs this handler will respond to. If the handler is found but the request method is not present a 405 will be returned.
Optional
pathSpecify a path to serve the protocol from. If omitted the protocol name will be used.
Paths can be looked up from the protocol map using getProtocolMap()
or by
making a GET request to /.well-known/libp2p/protocols
.
Options used to define a HTTP route that can handle requests