misskey/src/server/proxy/index.ts
MeiMei f014b7ae0e アニメーションを自動再生しないオプション (#4131)
* Refactor

* settings

* Media Proxy

* Replace API response
2019-02-05 03:01:36 +09:00

23 lines
371 B
TypeScript

/**
* Media Proxy
*/
import * as Koa from 'koa';
import * as cors from '@koa/cors';
import * as Router from 'koa-router';
import { proxyMedia } from './proxy-media';
// Init app
const app = new Koa();
app.use(cors());
// Init router
const router = new Router();
router.get('/:url*', proxyMedia);
// Register router
app.use(router.routes());
module.exports = app;