We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I'm trying to use hapi-io with a HTTPS Hapi server. I have two connections defined so as to be able to redirect all http requests (port 80) to https
server.connection({ port: 443, host: constants.application.host, tls: tls }); // https server.connection({ port: 80, host: constants.application.host }); //http
However, i cant use hapi-io since i get the following error on registering the plugin - error: hapi-io - multiple connections
error: hapi-io - multiple connections
This comes from the rule set in https://github.com/sibartlett/hapi-io/blob/master/lib/index.js#L34 if (s.connections.length !== 1) { return next('hapi-io - multiple connections'); }
if (s.connections.length !== 1) { return next('hapi-io - multiple connections'); }
How do i set it up on my server?
The text was updated successfully, but these errors were encountered:
Hi! server.connection returns a Server object with just a single connection. You can then do:
server.connection
Server
const https = server.connection({ port: 443, host: constants.application.host, tls: tls }); // https const http = server.connection({ port: 80, host: constants.application.host }); //http https.register(hapiIO); http.register(hapiIO)
Sorry, something went wrong.
No branches or pull requests
I'm trying to use hapi-io with a HTTPS Hapi server.
I have two connections defined so as to be able to redirect all http requests (port 80) to https
server.connection({ port: 443, host: constants.application.host, tls: tls }); // https server.connection({ port: 80, host: constants.application.host }); //http
However, i cant use hapi-io since i get the following error on registering the plugin -
error: hapi-io - multiple connections
This comes from the rule set in https://github.com/sibartlett/hapi-io/blob/master/lib/index.js#L34
if (s.connections.length !== 1) { return next('hapi-io - multiple connections'); }
How do i set it up on my server?
The text was updated successfully, but these errors were encountered: