Clean up proxy codes

Closes #35
This commit is contained in:
syuilo 2017-01-14 10:51:48 +09:00
parent 65a5373acb
commit 27c6ebebc0
5 changed files with 3 additions and 52 deletions

View file

@ -9,5 +9,7 @@ module.exports = async (req: express.Request, res: express.Response) => {
};
function wrap(url: string): string {
return `${config.proxy_url}/${url}`;
return url != null
? `https://images.weserv.nl/?url=${url.replace(/^https?:\/\//, '')}`
: null;
}