From f014b7ae0ece886ef0cff2366b9925e23b34ba6f Mon Sep 17 00:00:00 2001 From: MeiMei <30769358+mei23@users.noreply.github.com> Date: Tue, 5 Feb 2019 03:01:36 +0900 Subject: アニメーションを自動再生しないオプション (#4131) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Refactor * settings * Media Proxy * Replace API response --- src/server/proxy/index.ts | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 src/server/proxy/index.ts (limited to 'src/server/proxy/index.ts') diff --git a/src/server/proxy/index.ts b/src/server/proxy/index.ts new file mode 100644 index 0000000000..8d33af85da --- /dev/null +++ b/src/server/proxy/index.ts @@ -0,0 +1,22 @@ +/** + * 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; -- cgit v1.2.3-freya