Skip to content

Commit 3730f09

Browse files
committed
Adds periphery stuff to support secure mode (wss).
1 parent 5dad84e commit 3730f09

File tree

4 files changed

+12
-6
lines changed

4 files changed

+12
-6
lines changed

CHANGES.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
1+
### Aug 9, 2016 - 0.9.0
2+
3+
* `NEW` supports secure option for using wss - [@ridersx](https://github.com/ridersx) [(#66)](https://github.com/skellock/reactotron/pull/98)
4+
15
### July 29, 2016 - 0.8.0
26

37
* `NEW` support Symbol as Redux action types - [@fantasywind](https://github.com/fantasywind) [(#66)](https://github.com/skellock/reactotron/pull/66)
48
* `FIX` prevents sending empty subscription messages - [@skellock](https://github.com/skellock) [(#67)](https://github.com/skellock/reactotron/pull/67)
59

6-
710
### July 15, 2016 - 0.7.0
811

912
* `NEW` android ip auto-detection support! - [@jhen0409](https://github.com/jhen0409)

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,8 @@ const options = {
7777
name: 'React Web', // Display name of the client
7878
server: 'localhost', // IP of the server to connect to
7979
port: 3334, // Port of the server to connect to (default: 3334)
80-
enabled: true // Whether or not Reactotron should be enabled.
80+
enabled: true, // Whether or not Reactotron should be enabled.
81+
secure: false, // Are you piggybacking on HTTP or HTTPS (default: false)
8182
}
8283

8384
Reactotron.connect(options)

dist/client.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ var _extends = Object.assign || function (target) { for (var i = 1; i < argument
66

77
// --- Begin Awkward Hackzorz ---
88

9-
var REACTOTRON_VERSION = '0.8.0';
9+
var REACTOTRON_VERSION = '0.9.0';
1010
var R = require('ramda');
1111

1212
// client enabled flag
@@ -87,7 +87,8 @@ client.connect = function () {
8787
version: REACTOTRON_VERSION,
8888
server: 'localhost',
8989
port: 3334,
90-
enabled: true
90+
enabled: true,
91+
secure: false
9192
};
9293

9394
// merge user input with defaults
@@ -99,7 +100,7 @@ client.connect = function () {
99100
reactotronEnabled = config.enabled;
100101

101102
if (config.enabled) {
102-
socket = io('ws://' + config.server + ':' + config.port, {
103+
socket = io((config.secure ? 'wss' : 'ws') + '://' + config.server + ':' + config.port, {
103104
jsonp: false,
104105
transports: ['websocket']
105106
});

examples/ReactDomExample/App/Config/ReactotronConfig.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
import Reactotron from '../../client' // in a real app, you would use 'reactotron'
22

33
Reactotron.connect({
4-
name: 'ReactDomExample'
4+
name: 'ReactDomExample',
5+
secure: false
56
})
67

78
// a little easier (albiet ghetto) way to make Reactotron available in other

0 commit comments

Comments
 (0)