Optional
corsOptional
methodsA 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
.
By default all handlers support CORS headers, pass
false
here to disallow access to fetch requests.