diff --git a/AWS Compatibility/IIS Environment/.ebextensions/01_pre_deploy.config b/AWS Compatibility/IIS Environment/.ebextensions/01_pre_deploy.config new file mode 100644 index 000000000..44dc00ff0 --- /dev/null +++ b/AWS Compatibility/IIS Environment/.ebextensions/01_pre_deploy.config @@ -0,0 +1,16 @@ +commands: + 01_default_website_disable: + test: cmd /c "if exist C:\\Users\\Public\\initialized (exit 1) else (exit 0)" + command: C:\Windows\System32\inetsrv\appcmd.exe set config "Default Web Site" -section:system.webServer/httpLogging /dontLog:"True" /commit:apphost + ignoreErrors: true + 02_install_websockets_feature: + test: cmd /c "if exist C:\\Users\\Public\\initialized (exit 1) else (exit 0)" + command: C:\Windows\system32\DISM.EXE /enable-feature /online /featureName:"IIS-WebSockets" + ignoreErrors: true + 03_setting_firewall_for_websocket_port: + test: cmd /c "if exist C:\\Users\\Public\\initialized (exit 1) else (exit 0)" + command: netsh advfirewall firewall add rule name="World Wide Web Socket Port" dir=in action=allow protocol=TCP localport=8000 + ignoreErrors: true + 04_initializing: + test: cmd /c "if exist C:\\Users\\Public\\initialized (exit 1) else (exit 0)" + command: copy NUL C:\\Users\\Public\\initialized diff --git a/AWS Compatibility/IIS Environment/.ebextensions/02_environment_settings.config b/AWS Compatibility/IIS Environment/.ebextensions/02_environment_settings.config new file mode 100644 index 000000000..54e54646a --- /dev/null +++ b/AWS Compatibility/IIS Environment/.ebextensions/02_environment_settings.config @@ -0,0 +1,3 @@ +option_settings: + aws:elasticbeanstalk:environment: + LoadBalancerType: application \ No newline at end of file diff --git a/websocket-sharp/Server/WebSocketServer.cs b/websocket-sharp/Server/WebSocketServer.cs index fba17307b..aa458e1ae 100644 --- a/websocket-sharp/Server/WebSocketServer.cs +++ b/websocket-sharp/Server/WebSocketServer.cs @@ -618,7 +618,7 @@ private void init (string hostname, System.Net.IPAddress address, int port, bool private void processRequest (TcpListenerWebSocketContext context) { var uri = context.RequestUri; - if (uri == null || uri.Port != _port) { + if (uri == null) { context.Close (HttpStatusCode.BadRequest); return; }