Skip to content

Commit

Permalink
Added readme for proxy
Browse files Browse the repository at this point in the history
  • Loading branch information
alexslipknot committed Aug 6, 2018
1 parent 61fbaf1 commit 262c773
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ class MyHandler extends BaseHandler
protected function onClientMessage(string $message, int $socketId): Generator
{
$message = json_decode($message);
if(!empty($message)){
if (!empty($message)) {
$userName = $message->name;
$userMessage = $message->message;

Expand Down Expand Up @@ -142,6 +142,19 @@ Base `Handler` has own method to validate user to be logged in. By default it is
->run();
```

### Nginx reverse proxy

```nginx
# choose location path
location /websocket/ {
# use same host and port from your settings!
proxy_pass http://0.0.0.0:2082/;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_read_timeout 86400;
}
```

### Realtime testing (logging)

Expand Down

0 comments on commit 262c773

Please sign in to comment.