Skip to content

MeisskeyController

Tatsuya Koishi edited this page Feb 24, 2022 · 42 revisions

概要

めいすきー等、Misskey 10.xからのフォーク(MongoDBを使用したもの)に対するコントローラー。 本家Misskey用はMisskeyControllerを参照。

対応API

ハンドラへの制約

以下のハンドラには対応していない。

イベントへの制約

以下のイベントには対応していない。

  • pre_thumbnail
  • post_thumbnail
  • post_fav
  • post_search

nginxの設定例

Misskey公式の設定例を使用し、 同一ホストにモロヘイヤを置く想定で。

  location = /api/notes/create {
    proxy_set_header Host $host;
    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_http_version 1.1;
    proxy_redirect off;
    if ($http_x_mulukhiya != '') {
      proxy_pass http://localhost:3000;
    }
    if ($http_x_mulukhiya = '') {
      proxy_pass http://localhost:3008;
    }
  }
  location = /api/drive/files/create {
    proxy_set_header Host $host;
    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_http_version 1.1;
    proxy_redirect off;
    if ($http_x_mulukhiya != '') {
      proxy_pass http://localhost:3000;
    }
    if ($http_x_mulukhiya = '') {
      proxy_pass http://localhost:3008;
    }
  }
  location = /api/notes/favorites/create {
    proxy_set_header Host $host;
    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_http_version 1.1;
    proxy_redirect off;
    if ($http_x_mulukhiya != '') {
      proxy_pass http://localhost:3000;
    }
    if ($http_x_mulukhiya = '') {
      proxy_pass http://localhost:3008;
    }
  }
  location = /api/messaging/messages/create {
    proxy_set_header Host $host;
    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_http_version 1.1;
    proxy_redirect off;
    if ($http_x_mulukhiya != '') {
      proxy_pass http://localhost:3000;
    }
    if ($http_x_mulukhiya = '') {
      proxy_pass http://localhost:3008;
    }
  }
  location ^~ /mulukhiya {
    proxy_pass http://localhost:3008;
  }

設定ファイルのサンプル

agent:
  info:
    token: your_token
  test:
    token: your_token
alert:
  hooks:
    - https://hooks.slack.com/services/xxxxx
    - https://discordapp.com/api/webhooks/xxxxx/slack
controller: meisskey
crypt:
  password: your_password
  salt: your_salt
environment: production
handler:
  default_tag:
    tags:
      - タグ1
      - タグ2
  dictionary_tag:
    dics: []
  hexo_announce:
    category: お知らせ
  image_resize:
    pixel: 1920
  itunes_image:
    disable: true
  spotify_image:
    disable: true
  you_tube_image:
    disable: true
meisskey:
  attachment:
    types:
      image: image/jpeg
  url: https://meisskey.example.com/
mongo:
  dsn: mongo://localhost:27017/misskey
sidekiq:
  auth:
    password: your_password
  redis:
    dsn: redis://localhost:6379/2
user_config:
  redis:
    dsn: redis://localhost:6379/1
Clone this wiki locally