mirror of
https://github.com/waku-org/js-waku.git
synced 2025-01-12 21:44:33 +00:00
chore: enabile back filterAll if set by consumer (#2103)
This commit is contained in:
parent
409642d7d3
commit
2beb359cef
@ -30,4 +30,9 @@ export type CreateLibp2pOptions = Libp2pOptions & {
|
||||
*/
|
||||
hideWebSocketInfo?: boolean;
|
||||
pingMaxInboundStreams?: number;
|
||||
/**
|
||||
* Applies secure web socket filters.
|
||||
* @default true
|
||||
*/
|
||||
filterMultiaddrs?: boolean;
|
||||
};
|
||||
|
@ -64,13 +64,16 @@ export async function defaultLibp2p(
|
||||
? { metadata: wakuMetadata(pubsubTopics) }
|
||||
: {};
|
||||
|
||||
const filter = process?.env?.NODE_ENV === "test" ? filterAll : wss;
|
||||
const filter =
|
||||
options?.filterMultiaddrs === false || process?.env?.NODE_ENV === "test"
|
||||
? filterAll
|
||||
: wss;
|
||||
|
||||
return createLibp2p({
|
||||
connectionManager: {
|
||||
minConnections: 1
|
||||
},
|
||||
transports: [webSockets({ filter })],
|
||||
transports: [webSockets({ filter: filter })],
|
||||
streamMuxers: [mplex()],
|
||||
connectionEncryption: [noise()],
|
||||
...options,
|
||||
|
Loading…
x
Reference in New Issue
Block a user