diff options
| author | MeiMei <30769358+mei23@users.noreply.github.com> | 2020-05-09 08:18:21 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-05-09 08:18:21 +0900 |
| commit | d1be8b43f699393733ea66a973570084c06e4413 (patch) | |
| tree | 817394b8a6b761de371c6ed1f1fd735520a1c52d | |
| parent | chore: Use actions/checkout@v2 (#6328) (diff) | |
| download | sharkey-d1be8b43f699393733ea66a973570084c06e4413.tar.gz sharkey-d1be8b43f699393733ea66a973570084c06e4413.tar.bz2 sharkey-d1be8b43f699393733ea66a973570084c06e4413.zip | |
brotli圧縮の無効化など Resolve #6325 (#6326)
* disable brotli
* disable compress between nginx and app
| -rw-r--r-- | docs/examples/misskey.nginx | 1 | ||||
| -rw-r--r-- | src/server/index.ts | 5 |
2 files changed, 4 insertions, 2 deletions
diff --git a/docs/examples/misskey.nginx b/docs/examples/misskey.nginx index 6ed51f020c..382a4edf90 100644 --- a/docs/examples/misskey.nginx +++ b/docs/examples/misskey.nginx @@ -53,6 +53,7 @@ server { proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto https; + proxy_set_header Accept-Encoding ""; proxy_http_version 1.1; proxy_redirect off; diff --git a/src/server/index.ts b/src/server/index.ts index 81c70ea518..2834b5b703 100644 --- a/src/server/index.ts +++ b/src/server/index.ts @@ -10,7 +10,7 @@ import * as zlib from 'zlib'; import * as Koa from 'koa'; import * as Router from '@koa/router'; import * as mount from 'koa-mount'; -import * as compress from 'koa-compress'; +const compress = require('koa-compress'); import * as koaLogger from 'koa-logger'; import * as requestStats from 'request-stats'; import * as slow from 'koa-slow'; @@ -50,7 +50,8 @@ if (!['production', 'test'].includes(process.env.NODE_ENV || '')) { // Compress response app.use(compress({ - flush: zlib.constants.Z_SYNC_FLUSH + flush: zlib.constants.Z_SYNC_FLUSH, + br: false })); // HSTS |