diff options
| author | Akihiko Odaki <nekomanma@pixiv.co.jp> | 2018-03-25 23:10:31 +0900 |
|---|---|---|
| committer | Akihiko Odaki <nekomanma@pixiv.co.jp> | 2018-03-25 23:10:31 +0900 |
| commit | a633f184ab40876ee87d6e9c33aa88ec0f494fc0 (patch) | |
| tree | 1e1e03233d4478ccc060b181a53a3bf12afe6c61 | |
| parent | Pass hostname instead of host to vhost module (diff) | |
| download | misskey-a633f184ab40876ee87d6e9c33aa88ec0f494fc0.tar.gz misskey-a633f184ab40876ee87d6e9c33aa88ec0f494fc0.tar.bz2 misskey-a633f184ab40876ee87d6e9c33aa88ec0f494fc0.zip | |
Allow to use domain whose prefix is not misskey
| -rw-r--r-- | gulpfile.ts | 1 | ||||
| -rw-r--r-- | src/web/app/boot.js | 4 |
2 files changed, 2 insertions, 3 deletions
diff --git a/gulpfile.ts b/gulpfile.ts index b70e5d8bcb..c10d0a98d0 100644 --- a/gulpfile.ts +++ b/gulpfile.ts @@ -124,6 +124,7 @@ gulp.task('build:client:script', () => .pipe(replace('VERSION', JSON.stringify(version))) .pipe(replace('API', JSON.stringify(config.api_url))) .pipe(replace('ENV', JSON.stringify(env))) + .pipe(replace('HOST', JSON.stringify(config.host))) .pipe(isProduction ? uglify({ toplevel: true } as any) : gutil.noop()) diff --git a/src/web/app/boot.js b/src/web/app/boot.js index 2ee61745b0..00ac9daad9 100644 --- a/src/web/app/boot.js +++ b/src/web/app/boot.js @@ -27,9 +27,7 @@ // misskey.alice => misskey // misskey.strawberry.pasta => misskey // dev.misskey.arisu.tachibana => dev - let app = url.host == 'localhost' - ? 'misskey' - : url.host.split('.')[0]; + let app = url.host === HOST ? 'misskey' : url.host.substr(0, -HOST.length); // Detect the user language // Note: The default language is English |