diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2018-05-24 22:21:10 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2018-05-24 22:21:10 +0900 |
| commit | f025296331eb46c78d7d95910292c934b5b0510e (patch) | |
| tree | b39ecc2c05d892f75c875cb6144a549dcee1d771 /src/server | |
| parent | 2.16.8 (diff) | |
| download | sharkey-f025296331eb46c78d7d95910292c934b5b0510e.tar.gz sharkey-f025296331eb46c78d7d95910292c934b5b0510e.tar.bz2 sharkey-f025296331eb46c78d7d95910292c934b5b0510e.zip | |
Enable HTTP/2
Diffstat (limited to 'src/server')
| -rw-r--r-- | src/server/index.ts | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/server/index.ts b/src/server/index.ts index ded8f7706e..fc3d252e10 100644 --- a/src/server/index.ts +++ b/src/server/index.ts @@ -4,8 +4,7 @@ import * as fs from 'fs'; import * as http from 'http'; -import * as https from 'https'; -//import * as http2 from 'http2'; +import * as http2 from 'http2'; import * as zlib from 'zlib'; import * as Koa from 'koa'; import * as Router from 'koa-router'; @@ -68,8 +67,7 @@ function createServer() { certs[k] = fs.readFileSync(config.https[k]); }); certs['allowHTTP1'] = true; - //return http2.createSecureServer(certs, app.callback()); - return https.createServer(certs, app.callback()); + return http2.createSecureServer(certs, app.callback()); } else { return http.createServer(app.callback()); } |