diff options
| author | Acid Chicken (硫酸鶏) <root@acid-chicken.com> | 2019-02-04 02:09:41 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-02-04 02:09:41 +0900 |
| commit | 67792fcb5e866cfad6fc6788b8555526658099fc (patch) | |
| tree | 8ad8f25c30967f8cf87e5b5e4b6016f7819cde4b /src | |
| parent | Merge branch 'develop' into acid-chicken-patch-10 (diff) | |
| download | misskey-67792fcb5e866cfad6fc6788b8555526658099fc.tar.gz misskey-67792fcb5e866cfad6fc6788b8555526658099fc.tar.bz2 misskey-67792fcb5e866cfad6fc6788b8555526658099fc.zip | |
Update load.ts
Diffstat (limited to 'src')
| -rw-r--r-- | src/config/load.ts | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/config/load.ts b/src/config/load.ts index 904305647d..1cec3b1485 100644 --- a/src/config/load.ts +++ b/src/config/load.ts @@ -59,6 +59,7 @@ function validateUrl(url: string) { const result = tryCreateUrl(url); if (result.pathname.trim('/').length) throw `url="${url}" is not a valid URL, has a pathname.`; if (!url.includes(result.host)) throw `url="${url}" is not a valid URL, has an invalid hostname.`; + if (!/^https?:$/.test(result.protocol)) throw `url="${url}" is not a valid URL, has an invalid protocol.`; return result; } |