Skip to content

Commit eb5f7d6

Browse files
committed
Update readme to include instructions for serving Faye over HTTPS
Special thanks to Ryan Bates' instructions: https://github.com/ryanb/private_pub#serving-faye-over-https-with-thin
1 parent 2f9b440 commit eb5f7d6

1 file changed

Lines changed: 26 additions & 0 deletions

File tree

README.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -295,6 +295,32 @@ CacheDigests::DependencyTracker.register_tracker :erb, Sync::ERBTracker
295295

296296
**Note:** haml support is limited, but it seems to work in most cases.
297297

298+
299+
## Serving Faye over HTTPS (with Thin)
300+
301+
Create a thin configuration file `config/sync_thin.yml` similar to the following:
302+
303+
```yaml
304+
---
305+
port: 4443
306+
ssl: true
307+
ssl_key_file: /path/to/server.pem
308+
ssl_cert_file: /path/to/certificate_chain.pem
309+
environment: production
310+
rackup: sync.ru
311+
```
312+
313+
The `certificate_chain.pem` file should contain your signed certificate, followed by intermediate certificates (if any) and the root certificate of the CA that signed the key.
314+
315+
Next reconfigure the `server` and `adapter_javascript_url` in `config/sync.yml` to look like `https://your.hostname.com:4443/faye` and `https://your.hostname.com:4443/faye/faye.js` respectively.
316+
317+
Finally start up Thin from the project root.
318+
319+
```
320+
thin -C config/sync_thin.yml start
321+
```
322+
323+
298324
## Brief Example or [checkout an example application](https://github.com/chrismccord/sync_example)
299325
300326
View `sync/users/_user_list_row.html.erb`

0 commit comments

Comments
 (0)