var options = {
pfx: fs.readFileSync(__dirname + '/config/server.pfx'),
// **optional** SPDY-specific options
spdy: {
plain: false,
// **optional**
// Parse first incoming X_FORWARDED_FOR frame and put it to the
// headers of every request.
// NOTE: Use with care! This should not be used without some proxy that
// will *always* send X_FORWARDED_FOR
connection: {
windowSize: 1024 * 1024, // Server's window size
// **optional** if true - server will send 3.1 frames on 3.0 *plain* spdy
autoSpdy31: false
}
}
};
var server = spdy.createServer(options, function(req, res) {
res.writeHead(200);
res.end('hello world!');
});
server.listen(8443);
to test out http/2 running Node.js 4.5.0. I'm getting the protocol options via NPN but nothing via ALPN. I'm using https://tools.keycdn.com/http2-test to test out the implementation. Running behind a ELB on TCP load balancing mode.
I have used the following code:
to test out http/2 running Node.js 4.5.0. I'm getting the protocol options via NPN but nothing via ALPN. I'm using https://tools.keycdn.com/http2-test to test out the implementation. Running behind a ELB on TCP load balancing mode.