Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Socket over SSL #34

Open
mszajner opened this issue May 17, 2018 · 1 comment
Open

Socket over SSL #34

mszajner opened this issue May 17, 2018 · 1 comment

Comments

@mszajner
Copy link

mszajner commented May 17, 2018

How can I configure Socket Pouch server to work with SSL? My server.js:
var socketPouchServer = require('socket-pouch/server');
socketPouchServer.listen(5985, {
remoteUrl: 'http://localhost:5984',
socketOptions: {
pingTimeout: 30000,
pingInterval: 20000
}
}, function () {
console.log('server started!');
});

@kripper
Copy link

kripper commented Oct 23, 2021

a) You can config a proxy on Apache:

        # Proxy socket-pouch
        RewriteCond %{REQUEST_URI}  ^/engine.io            [NC]
        RewriteCond %{QUERY_STRING} transport=websocket    [NC]
        RewriteRule /(.*)           ws://localhost:5000/$1 [P,L]

        ProxyPass        /engine.io http://localhost:5000/engine.io
        ProxyPassReverse /engine.io http://localhost:5000/engine.io

b) Or you could patch socket-pouch to create a HTTPS Server with engine.io:
See: socketio/engine.io-client#356

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants