[Modify] Allow it or not

This commit is contained in:
sta 2016-10-07 14:54:24 +09:00
parent b4c62cf360
commit 7bd87ee4da

View File

@ -61,6 +61,7 @@ namespace WebSocketSharp.Server
#region Private Fields
private System.Net.IPAddress _address;
private bool _allowForwardedRequest;
private AuthenticationSchemes _authSchemes;
private static readonly string _defaultRealm;
private bool _dnsStyle;
@ -630,6 +631,7 @@ namespace WebSocketSharp.Server
return;
}
if (!_allowForwardedRequest) {
if (uri.Port != _port) {
context.Close (HttpStatusCode.BadRequest);
return;
@ -639,6 +641,7 @@ namespace WebSocketSharp.Server
context.Close (HttpStatusCode.NotFound);
return;
}
}
WebSocketServiceHost host;
if (!_services.InternalTryGetServiceHost (uri.AbsolutePath, out host)) {