Add ws-max-paxload (#155)
This commit is contained in:
@@ -223,6 +223,7 @@ pub fn start_ws<M, S, H, T, U, V>(
|
||||
extractor: T,
|
||||
middleware: V,
|
||||
stats: U,
|
||||
max_payload: usize,
|
||||
) -> Result<ws::Server, ws::Error>
|
||||
where
|
||||
M: jsonrpc_core::Metadata,
|
||||
@@ -237,6 +238,7 @@ where
|
||||
.allowed_origins(allowed_origins)
|
||||
.allowed_hosts(allowed_hosts)
|
||||
.max_connections(max_connections)
|
||||
.max_payload(max_payload * 1024 * 1024)
|
||||
.session_stats(stats)
|
||||
.start(addr)
|
||||
}
|
||||
|
||||
@@ -44,6 +44,7 @@ pub fn serve() -> (Server<ws::Server>, usize, GuardedAuthCodes) {
|
||||
extractors::WsExtractor::new(Some(&authcodes.path)),
|
||||
extractors::WsExtractor::new(Some(&authcodes.path)),
|
||||
extractors::WsStats::new(stats),
|
||||
5 * 1024 * 1024,
|
||||
)
|
||||
.unwrap()
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user