remove HTTPS handling (#8380)
This commit is contained in:
parent
39676ad683
commit
26d90cd030
5 changed files with 11 additions and 48 deletions
|
@ -15,10 +15,7 @@ url: https://example.tld/
|
||||||
#───┘ Port and TLS settings └───────────────────────────────────
|
#───┘ Port and TLS settings └───────────────────────────────────
|
||||||
|
|
||||||
#
|
#
|
||||||
# Misskey supports two deployment options for public.
|
# Misskey requires a reverse proxy to support HTTPS connections.
|
||||||
#
|
|
||||||
|
|
||||||
# Option 1: With Reverse Proxy
|
|
||||||
#
|
#
|
||||||
# +----- https://example.tld/ ------------+
|
# +----- https://example.tld/ ------------+
|
||||||
# +------+ |+-------------+ +----------------+|
|
# +------+ |+-------------+ +----------------+|
|
||||||
|
@ -26,30 +23,12 @@ url: https://example.tld/
|
||||||
# +------+ |+-------------+ +----------------+|
|
# +------+ |+-------------+ +----------------+|
|
||||||
# +---------------------------------------+
|
# +---------------------------------------+
|
||||||
#
|
#
|
||||||
# You need to setup reverse proxy. (eg. nginx)
|
# You need to set up a reverse proxy. (e.g. nginx)
|
||||||
# You do not define 'https' section.
|
# An encrypted connection with HTTPS is highly recommended
|
||||||
|
# because tokens may be transferred in GET requests.
|
||||||
|
|
||||||
# Option 2: Standalone
|
# The port that your Misskey server should listen on.
|
||||||
#
|
port: 3000
|
||||||
# +- https://example.tld/ -+
|
|
||||||
# +------+ | +---------------+ |
|
|
||||||
# | User | ---> | | Misskey (443) | |
|
|
||||||
# +------+ | +---------------+ |
|
|
||||||
# +------------------------+
|
|
||||||
#
|
|
||||||
# You need to run Misskey as root.
|
|
||||||
# You need to set Certificate in 'https' section.
|
|
||||||
|
|
||||||
# To use option 1, uncomment below line.
|
|
||||||
#port: 3000 # A port that your Misskey server should listen.
|
|
||||||
|
|
||||||
# To use option 2, uncomment below lines.
|
|
||||||
#port: 443
|
|
||||||
|
|
||||||
#https:
|
|
||||||
# # path for certification
|
|
||||||
# key: /etc/letsencrypt/live/example.tld/privkey.pem
|
|
||||||
# cert: /etc/letsencrypt/live/example.tld/fullchain.pem
|
|
||||||
|
|
||||||
# ┌──────────────────────────┐
|
# ┌──────────────────────────┐
|
||||||
#───┘ PostgreSQL configuration └────────────────────────────────
|
#───┘ PostgreSQL configuration └────────────────────────────────
|
||||||
|
|
|
@ -17,6 +17,10 @@ You should also include the user name that made the change.
|
||||||
|
|
||||||
### Changes
|
### Changes
|
||||||
- ノートの最大文字数を設定できる機能が廃止され、デフォルトで一律3000文字になりました @syuilo
|
- ノートの最大文字数を設定できる機能が廃止され、デフォルトで一律3000文字になりました @syuilo
|
||||||
|
- Misskey can no longer terminate HTTPS connections. @Johann150
|
||||||
|
If you did not use a reverse proxy (e.g. nginx) before, you will probably need to adjust
|
||||||
|
your configuration file and set up a reverse proxy. The `https` configuration key is no
|
||||||
|
longer recognized!
|
||||||
|
|
||||||
### Improvements
|
### Improvements
|
||||||
- インスタンスデフォルトテーマを設定できるように @syuilo
|
- インスタンスデフォルトテーマを設定できるように @syuilo
|
||||||
|
|
|
@ -6,7 +6,6 @@ export type Source = {
|
||||||
feedback_url?: string;
|
feedback_url?: string;
|
||||||
url: string;
|
url: string;
|
||||||
port: number;
|
port: number;
|
||||||
https?: { [x: string]: string };
|
|
||||||
disableHsts?: boolean;
|
disableHsts?: boolean;
|
||||||
db: {
|
db: {
|
||||||
host: string;
|
host: string;
|
||||||
|
|
|
@ -64,11 +64,6 @@ export const meta = {
|
||||||
optional: false, nullable: false,
|
optional: false, nullable: false,
|
||||||
default: 'https://github.com/misskey-dev/misskey/issues/new',
|
default: 'https://github.com/misskey-dev/misskey/issues/new',
|
||||||
},
|
},
|
||||||
secure: {
|
|
||||||
type: 'boolean',
|
|
||||||
optional: false, nullable: false,
|
|
||||||
default: false,
|
|
||||||
},
|
|
||||||
defaultDarkTheme: {
|
defaultDarkTheme: {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
optional: false, nullable: true,
|
optional: false, nullable: true,
|
||||||
|
@ -489,9 +484,6 @@ export default define(meta, paramDef, async (ps, me) => {
|
||||||
tosUrl: instance.ToSUrl,
|
tosUrl: instance.ToSUrl,
|
||||||
repositoryUrl: instance.repositoryUrl,
|
repositoryUrl: instance.repositoryUrl,
|
||||||
feedbackUrl: instance.feedbackUrl,
|
feedbackUrl: instance.feedbackUrl,
|
||||||
|
|
||||||
secure: config.https != null,
|
|
||||||
|
|
||||||
disableRegistration: instance.disableRegistration,
|
disableRegistration: instance.disableRegistration,
|
||||||
disableLocalTimeline: instance.disableLocalTimeline,
|
disableLocalTimeline: instance.disableLocalTimeline,
|
||||||
disableGlobalTimeline: instance.disableGlobalTimeline,
|
disableGlobalTimeline: instance.disableGlobalTimeline,
|
||||||
|
|
|
@ -4,8 +4,6 @@
|
||||||
|
|
||||||
import * as fs from 'node:fs';
|
import * as fs from 'node:fs';
|
||||||
import * as http from 'http';
|
import * as http from 'http';
|
||||||
import * as http2 from 'http2';
|
|
||||||
import * as https from 'https';
|
|
||||||
import Koa from 'koa';
|
import Koa from 'koa';
|
||||||
import Router from '@koa/router';
|
import Router from '@koa/router';
|
||||||
import mount from 'koa-mount';
|
import mount from 'koa-mount';
|
||||||
|
@ -123,16 +121,7 @@ app.use(router.routes());
|
||||||
app.use(mount(webServer));
|
app.use(mount(webServer));
|
||||||
|
|
||||||
function createServer() {
|
function createServer() {
|
||||||
if (config.https) {
|
|
||||||
const certs: any = {};
|
|
||||||
for (const k of Object.keys(config.https)) {
|
|
||||||
certs[k] = fs.readFileSync(config.https[k]);
|
|
||||||
}
|
|
||||||
certs['allowHTTP1'] = true;
|
|
||||||
return http2.createSecureServer(certs, app.callback()) as https.Server;
|
|
||||||
} else {
|
|
||||||
return http.createServer(app.callback());
|
return http.createServer(app.callback());
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// For testing
|
// For testing
|
||||||
|
|
Loading…
Reference in a new issue