mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-04-25 17:58:33 +02:00
Add WebSockets
This commit is contained in:
@@ -80,6 +80,14 @@ internal partial class AspNetCoreSelfHost : IOwinSelfHost
|
||||
|
||||
#if NET8_0_OR_GREATER
|
||||
UseCors(appBuilder);
|
||||
|
||||
var webSocketOptions = new WebSocketOptions();
|
||||
if (_wireMockMiddlewareOptions.WebSocketSettings?.KeepAliveIntervalSeconds != null)
|
||||
{
|
||||
webSocketOptions.KeepAliveInterval = TimeSpan.FromSeconds(_wireMockMiddlewareOptions.WebSocketSettings.KeepAliveIntervalSeconds);
|
||||
}
|
||||
|
||||
appBuilder.UseWebSockets(webSocketOptions);
|
||||
#endif
|
||||
_wireMockMiddlewareOptions.PreWireMockMiddlewareInit?.Invoke(appBuilder);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user