mirror of
https://github.com/paricafe/misskey.git
synced 2024-11-29 03:06:44 -06:00
Enable HTTP/2
This commit is contained in:
parent
321841101b
commit
f025296331
1 changed files with 2 additions and 4 deletions
|
@ -4,8 +4,7 @@
|
||||||
|
|
||||||
import * as fs from 'fs';
|
import * as fs from 'fs';
|
||||||
import * as http from 'http';
|
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 zlib from 'zlib';
|
||||||
import * as Koa from 'koa';
|
import * as Koa from 'koa';
|
||||||
import * as Router from 'koa-router';
|
import * as Router from 'koa-router';
|
||||||
|
@ -68,8 +67,7 @@ function createServer() {
|
||||||
certs[k] = fs.readFileSync(config.https[k]);
|
certs[k] = fs.readFileSync(config.https[k]);
|
||||||
});
|
});
|
||||||
certs['allowHTTP1'] = true;
|
certs['allowHTTP1'] = true;
|
||||||
//return http2.createSecureServer(certs, app.callback());
|
return http2.createSecureServer(certs, app.callback());
|
||||||
return https.createServer(certs, app.callback());
|
|
||||||
} else {
|
} else {
|
||||||
return http.createServer(app.callback());
|
return http.createServer(app.callback());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue