[Modify] Allow it or not
This commit is contained in:
parent
b4c62cf360
commit
7bd87ee4da
@ -61,6 +61,7 @@ namespace WebSocketSharp.Server
|
|||||||
#region Private Fields
|
#region Private Fields
|
||||||
|
|
||||||
private System.Net.IPAddress _address;
|
private System.Net.IPAddress _address;
|
||||||
|
private bool _allowForwardedRequest;
|
||||||
private AuthenticationSchemes _authSchemes;
|
private AuthenticationSchemes _authSchemes;
|
||||||
private static readonly string _defaultRealm;
|
private static readonly string _defaultRealm;
|
||||||
private bool _dnsStyle;
|
private bool _dnsStyle;
|
||||||
@ -630,6 +631,7 @@ namespace WebSocketSharp.Server
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!_allowForwardedRequest) {
|
||||||
if (uri.Port != _port) {
|
if (uri.Port != _port) {
|
||||||
context.Close (HttpStatusCode.BadRequest);
|
context.Close (HttpStatusCode.BadRequest);
|
||||||
return;
|
return;
|
||||||
@ -639,6 +641,7 @@ namespace WebSocketSharp.Server
|
|||||||
context.Close (HttpStatusCode.NotFound);
|
context.Close (HttpStatusCode.NotFound);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
WebSocketServiceHost host;
|
WebSocketServiceHost host;
|
||||||
if (!_services.InternalTryGetServiceHost (uri.AbsolutePath, out host)) {
|
if (!_services.InternalTryGetServiceHost (uri.AbsolutePath, out host)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user