diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2017-01-07 20:34:41 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2017-01-07 20:34:41 +0900 |
| commit | 4e9bb87d9409917f1f3a53fe00292c05507daed1 (patch) | |
| tree | 41d935664dd2ca0927e465d7af2b0d070bdae543 /src/web/service/proxy | |
| parent | Revert (diff) | |
| download | sharkey-4e9bb87d9409917f1f3a53fe00292c05507daed1.tar.gz sharkey-4e9bb87d9409917f1f3a53fe00292c05507daed1.tar.bz2 sharkey-4e9bb87d9409917f1f3a53fe00292c05507daed1.zip | |
[Server] Fix bug
Diffstat (limited to 'src/web/service/proxy')
| -rw-r--r-- | src/web/service/proxy/proxy.ts | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/web/service/proxy/proxy.ts b/src/web/service/proxy/proxy.ts index 8a45f08530..48c9fa4a53 100644 --- a/src/web/service/proxy/proxy.ts +++ b/src/web/service/proxy/proxy.ts @@ -1,11 +1,12 @@ import * as URL from 'url'; import * as express from 'express'; import * as request from 'request'; +import * as isUrl from 'is-url'; module.exports = (req: express.Request, res: express.Response) => { const url = req.params.url; - if (!url) { + if (!url || !isUrl(url)) { return; } |