mirror of
https://github.com/tokio-rs/axum.git
synced 2026-09-07 00:00:12 +02:00
Add accept_unmasked_frames setting in WebSocketUpgrade (#1529)
* Add accept_unmasked_frames setting in WebSocketUpgrade * Update CHANGELOG.md * Apply suggestions from code review Co-authored-by: David Pedersen <[email protected]>
This commit is contained in:
co-authored by
David Pedersen
parent
587435940b
commit
c461f1d827
+1
-1
@@ -7,7 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
|
|
||||||
# Unreleased
|
# Unreleased
|
||||||
|
|
||||||
- None.
|
- **added:** Add `accept_unmasked_frames` setting in WebSocketUpgrade ([#1529])
|
||||||
|
|
||||||
# 0.6.0-rc.4 (9. November, 2022)
|
# 0.6.0-rc.4 (9. November, 2022)
|
||||||
|
|
||||||
|
|||||||
@@ -164,6 +164,12 @@ impl WebSocketUpgrade {
|
|||||||
self
|
self
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Allow server to accept unmasked frames (defaults to false)
|
||||||
|
pub fn accept_unmasked_frames(mut self, accept: bool) -> Self {
|
||||||
|
self.config.accept_unmasked_frames = accept;
|
||||||
|
self
|
||||||
|
}
|
||||||
|
|
||||||
/// Set the known protocols.
|
/// Set the known protocols.
|
||||||
///
|
///
|
||||||
/// If the protocol name specified by `Sec-WebSocket-Protocol` header
|
/// If the protocol name specified by `Sec-WebSocket-Protocol` header
|
||||||
|
|||||||
Reference in New Issue
Block a user